From b5061149a6e1330d6f850a9ee792fb2595c46670 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 5 Mar 2012 12:43:07 +0100 Subject: [PATCH] HInfo->ServiceTable initialization in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4 Initialize also HInfo->ServiceTable in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4 functions (cherry picked from commit 26c3f87eca8922ce594e20e419fbf134b82208a0) --- ChangeLog | 7 +++++++ upnp/src/api/upnpapi.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 19105a0..b491a0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -299,6 +299,13 @@ Version 1.8.0 Version 1.6.16 ******************************************************************************* +2012-03-05 Fabrice Fontaine + + HInfo->ServiceTable initialization in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4 + + Initialize also HInfo->ServiceTable in UpnpRegisterRootDevice2 and + UpnpRegisterRootDevice4 functions + 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3496703 - Handle_Info::ServiceList may have undefined value diff --git a/upnp/src/api/upnpapi.c b/upnp/src/api/upnpapi.c index 3c27a75..2e05335 100644 --- a/upnp/src/api/upnpapi.c +++ b/upnp/src/api/upnpapi.c @@ -1041,6 +1041,7 @@ int UpnpRegisterRootDevice2( */ UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, "UpnpRegisterRootDevice2: Gena Check\n" ); + memset(&HInfo->ServiceTable, 0, sizeof(HInfo->ServiceTable)); hasServiceTable = getServiceTable( (IXML_Node *)HInfo->DescDocument, &HInfo->ServiceTable, @@ -1206,6 +1207,7 @@ int UpnpRegisterRootDevice4( */ UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, "UpnpRegisterRootDevice4: Gena Check\n" ); + memset(&HInfo->ServiceTable, 0, sizeof(HInfo->ServiceTable)); hasServiceTable = getServiceTable( (IXML_Node *)HInfo->DescDocument, &HInfo->ServiceTable,