changeset 476:e8d761c2d2d1

Make sure that retval is terminated
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 24 Apr 2014 10:31:43 +0000
parents 6c4f526a4c5b
children 48161978c84c
files cinst/nssstore_linux.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cinst/nssstore_linux.c	Thu Apr 24 09:41:42 2014 +0000
+++ b/cinst/nssstore_linux.c	Thu Apr 24 10:31:43 2014 +0000
@@ -66,6 +66,7 @@
   path_len = strlen (buf);
   retval = xmalloc (path_len + 1);
   strncpy (retval, buf, path_len);
+  retval[path_len] = '\0';
 
   return retval;
 }

http://wald.intevation.org/projects/trustbridge/