@cryptotaxi247 / netdata-1 / commits / ad330947b

strncpyz fixed.

Frederico Lamberti Pissarra committed May 12, 2016 at 20:01 UTC ad330947b533f02d1fb08d708a10afeb4fa73e56
1 file changed +1 -1
src/common.c
+1 -1
@@ -780,7 +780,7 @@ char *strncpyz(char *dest, const char *src, size_t n)
780 {
781 char *p = dest;
782
783 - while (n--)
783 + while (*src && n--)
784 *dest++ = *src++;
785 *dest = '\0';
786