From 8058de50b24f548df74df0943cb3a29c77fbde61 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Fri, 18 Apr 2008 08:53:43 +0200 Subject: [PATCH] Put '\0' to the end of xmalloc'd string to avoid surprises --- lib/fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fs.c b/lib/fs.c index 02b0ac7..80badb2 100644 --- a/lib/fs.c +++ b/lib/fs.c @@ -96,6 +96,7 @@ static int getFilesystemList(void) fsn = xmalloc(fsnameLength + 1); strncpy(fsn, (char *)vm + vm->vmt_data[VMT_STUB].vmt_off, fsnameLength); + fsn[fsnameLength] = '\0'; filesystems[i].mntPoint = fsnames[i] = fsn; -- 2.7.4