add the end of string character when it is necessary Signed-off-by: Ivana Hutarova Varekova <varek...@redhat.com> ---
src/tools/cgsnapshot.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/tools/cgsnapshot.c b/src/tools/cgsnapshot.c index 51194f6..c145429 100644 --- a/src/tools/cgsnapshot.c +++ b/src/tools/cgsnapshot.c @@ -729,10 +729,12 @@ int main(int argc, char *argv[]) case 'b': flags |= FL_BLACK; strncpy(bl_file, optarg, FILENAME_MAX); + bl_file[FILENAME_MAX-1] = '\0'; break; case 'w': flags |= FL_WHITE; strncpy(wl_file, optarg, FILENAME_MAX); + wl_file[FILENAME_MAX-1] = '\0'; break; case 't': flags |= FL_STRICT; ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel