Fix for typo in strndup() function definition.

(cherry picked from commit f46683fd0e)
This commit is contained in:
Chandra Penke 2011-01-17 09:03:34 -02:00 committed by Marcelo Roberto Jimenez
parent 1a574ed6cf
commit 56ab9ba913

View File

@ -48,7 +48,7 @@
size_t strsize = strnlen(__string, __n);
char *newstr = (char *)malloc(strsize + 1);
strncpy(newstr, __string, newstr);
strncpy(newstr, __string, strsize);
newstr[strsize] = 0;
return newstr;