diff --git a/ChangeLog b/ChangeLog index b1f708d..8317b12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Version 1.6.8 ******************************************************************************* +2010-10-20 Marcelo Roberto Jimenez + + Fix a long date memory leak in webserver.c:StrStr(). + 2010-10-19 Marcelo Roberto Jimenez Bug fix in select of miniserver.c diff --git a/upnp/src/genlib/net/http/webserver.c b/upnp/src/genlib/net/http/webserver.c index 90f914b..3c3c6e9 100644 --- a/upnp/src/genlib/net/http/webserver.c +++ b/upnp/src/genlib/net/http/webserver.c @@ -820,12 +820,12 @@ StrStr( char *S1, ToUpperCase( Str1 ); ToUpperCase( Str2 ); Ptr = strstr( Str1, Str2 ); - if( Ptr == NULL ) - return NULL; - - Pos = Ptr - Str1; - - Ret = S1 + Pos; + if( Ptr == NULL ) { + Ret = NULL; + } else { + Pos = Ptr - Str1; + Ret = S1 + Pos; + } free( Str1 ); free( Str2 );