diff cinst/nssstore_linux.c @ 476:e8d761c2d2d1

Make sure that retval is terminated
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 24 Apr 2014 10:31:43 +0000
parents c88090a15ae4
children 214bf504c54f
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/