From 56ab9ba913c8cb1a68941b672e4a55ddfe6acbf5 Mon Sep 17 00:00:00 2001 From: Chandra Penke Date: Mon, 17 Jan 2011 09:03:34 -0200 Subject: [PATCH] Fix for typo in strndup() function definition. (cherry picked from commit f46683fd0ed296afba5bbd5d80d7cfa2750aa982) --- upnp/src/api/UpnpString.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upnp/src/api/UpnpString.c b/upnp/src/api/UpnpString.c index f3b069e..25f3659 100644 --- a/upnp/src/api/UpnpString.c +++ b/upnp/src/api/UpnpString.c @@ -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;