Add some more sanity checks
Add some more sanity checks

Limit string size in sscanf, convert some sprintfs to snprintfs
(to make them future-proof), and free d in case of error.

Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

evgeni/pkg-lxcfs-debian,Xeno22/lxcfs,Xeno22/lxcfs,rhatdan/lxcfs,evgeni/pkg-lxcfs-debian,ralt/lxcfs,rhatdan/lxcfs,ralt/lxcfs