* upnp/src/api/Discovery.c: Fix a serious bug and memory leak in

UpnpDiscovery_strcpy_DeviceType(). Thanks to David Blanchet for the
patch.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@584 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2010-08-22 11:32:09 +00:00
parent 93a3016df1
commit a15e0c99d7
3 changed files with 9 additions and 3 deletions

View File

@ -2,6 +2,11 @@
Version 1.8.0
*******************************************************************************
2010-08-22 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* 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 <mroberto(at)users.sourceforge.net>
Separation of the ClientSubscription object.

1
THANKS
View File

@ -18,6 +18,7 @@ exempt of errors.
- Chris Pickel
- Chuck Thomason (cyt4)
- Craig Nelson
- David Blanchet
- David Maass
- Emil Ljungdahl
- Erik Johansson

View File

@ -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);
}