Mercurial > trustbridge
comparison 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 |
comparison
equal
deleted
inserted
replaced
475:6c4f526a4c5b | 476:e8d761c2d2d1 |
---|---|
64 *(p + 1) = '\0'; | 64 *(p + 1) = '\0'; |
65 | 65 |
66 path_len = strlen (buf); | 66 path_len = strlen (buf); |
67 retval = xmalloc (path_len + 1); | 67 retval = xmalloc (path_len + 1); |
68 strncpy (retval, buf, path_len); | 68 strncpy (retval, buf, path_len); |
69 retval[path_len] = '\0'; | |
69 | 70 |
70 return retval; | 71 return retval; |
71 } | 72 } |
72 | 73 |
73 /**@brief Start the process to install / remove | 74 /**@brief Start the process to install / remove |