diff --git a/ChangeLog b/ChangeLog index dd0f3c1..5cd45c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ Version 1.8.0 ******************************************************************************* +2010-08-22 Marcelo Jimenez + * upnp/src/api/Discovery.c: Fix a serious bug and memory leak in + UpnpDiscovery_strcpy_DeviceType(). Thanks to David Blanchet for the + patch. + 2010-04-25 Marcelo Jimenez Separation of the ClientSubscription object. diff --git a/THANKS b/THANKS index 7054191..013865b 100644 --- a/THANKS +++ b/THANKS @@ -18,6 +18,7 @@ exempt of errors. - Chris Pickel - Chuck Thomason (cyt4) - Craig Nelson +- David Blanchet - David Maass - Emil Ljungdahl - Erik Johansson diff --git a/upnp/src/api/Discovery.c b/upnp/src/api/Discovery.c index c971604..7be48f8 100644 --- a/upnp/src/api/Discovery.c +++ b/upnp/src/api/Discovery.c @@ -197,9 +197,9 @@ void UpnpDiscovery_set_DeviceType(UpnpDiscovery *p, const UpnpString *s) void UpnpDiscovery_strcpy_DeviceType(UpnpDiscovery *p, const char *s) { - UpnpString_delete(((struct SUpnpDiscovery *)p)->m_deviceID); - ((struct SUpnpDiscovery *)p)->m_deviceID = UpnpString_new(); - UpnpString_set_String(((struct SUpnpDiscovery *)p)->m_deviceID, s); + UpnpString_delete(((struct SUpnpDiscovery *)p)->m_deviceType); + ((struct SUpnpDiscovery *)p)->m_deviceType = UpnpString_new(); + UpnpString_set_String(((struct SUpnpDiscovery *)p)->m_deviceType, s); }