diff --git a/ChangeLog b/ChangeLog index 5907102..f4bb1e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,14 @@ Version 1.6.16 ******************************************************************************* +2012-03-05 Fabrice Fontaine + + SF Bug Tracker id 3497027 - Buffer not null terminated in parse_hostport + + Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:28:38 PST + + workbuf might be not null terminated. + 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497009 - Resource leak in http_SendMessage diff --git a/upnp/src/genlib/net/uri/uri.c b/upnp/src/genlib/net/uri/uri.c index 1491351..69053a2 100644 --- a/upnp/src/genlib/net/uri/uri.c +++ b/upnp/src/genlib/net/uri/uri.c @@ -328,8 +328,9 @@ int parse_hostport( int ret; memset(out, 0, sizeof(hostport_type)); + memset(workbuf, 0, sizeof(workbuf); /* Work on a copy of the input string. */ - strncpy(workbuf, in, sizeof(workbuf)); + strncpy(workbuf, in, sizeof(workbuf) - 1); c = workbuf; if (*c == '[') { /* IPv6 addresses are enclosed in square brackets. */