]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
[PATCH 2/3] cgsnapshot: fix strn* lengths
authorJiri Slaby <jslaby@suse.cz>
Tue, 4 Jan 2011 16:56:39 +0000 (17:56 +0100)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 5 Jan 2011 15:32:41 +0000 (21:02 +0530)
commitc00db68300bd61c57c04a92a279d5f0e36eef8cc
treeb510208e52ca6431723de3261db327de8de6e5e3
parent762d8da3a7fe43557cece69f64a7dbd426c22a02
[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 <jslaby@suse.cz>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
src/tools/cgsnapshot.c