[PATCH 2/3] cgsnapshot: fix strn* lengths
[PATCH 2/3] cgsnapshot: fix strn* lengths

The 'n' parameter in strncat stands for how much to copy from src, not
what's dest overall space. So we need to subtract full strlen we have
constructed so far.

Also fix one strncpy where we may pass too much as well as in strncpy.

Signed-off-by: Jiri Slaby <dfbf39eb5bf303a3db5454d815cb8c8888cbadf9@suse.cz>
Signed-off-by: Balbir Singh <65a1aed538f36fed73d8c45e9ddfc585ce9f4abf@linux.vnet.ibm.com>

rafalmiel/libcg,jrfastab/Linux-cgdcbxd,rafalmiel/libcg,rafalmiel/libcg,jrfastab/Linux-cgdcbxd,jrfastab/Linux-cgdcbxd,jrfastab/Linux-cgdcbxd,rafalmiel/libcg