Fix for typo in strndup() function definition.
(cherry picked from commit f46683fd0e
)
This commit is contained in:
parent
1a574ed6cf
commit
56ab9ba913
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user