little adjust on safe_strncpy()
@@ -541,6 +541,7 @@ char* safe_strncpy(char* dest, const char* source, size_t size)
char src[size + 1];
memset(src,'\0',size + 1);
strncpy(src,source,size);
+ src[size] = '\0';
strncpy(dest,src,size);
return dest;
}
