summaryrefslogtreecommitdiff
path: root/lib/fs.c
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2008-04-18 08:53:43 +0200
committerJindrich Novy <jnovy@redhat.com>2008-04-18 08:58:58 +0200
commit8058de50b24f548df74df0943cb3a29c77fbde61 (patch)
tree75597c26ba3e5a9311ae81ea73f123f349814cb5 /lib/fs.c
parent94ff22b129aeb31c38848231e40f87aa4a5613a1 (diff)
downloadrpm-8058de50b24f548df74df0943cb3a29c77fbde61.tar.gz
rpm-8058de50b24f548df74df0943cb3a29c77fbde61.tar.bz2
rpm-8058de50b24f548df74df0943cb3a29c77fbde61.zip
Put '\0' to the end of xmalloc'd string to avoid surprises
Diffstat (limited to 'lib/fs.c')
-rw-r--r--lib/fs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 02b0ac7ae..80badb2f7 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;