Initialize ServiceTable.

This commit is contained in:
Yoichi NAKAYAMA 2012-03-04 13:51:49 +09:00 committed by Fabrice Fontaine
parent 47c86542bc
commit 20372ccef6
2 changed files with 12 additions and 1 deletions

View File

@ -4,10 +4,20 @@ Version 1.6.16
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-03 20:35:08 PST
SF Bug Tracker id 3496703 - Handle_Info::ServiceList may have undefined value
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-03 20:49:25 PST
In UpnpRegisterRootDevice(), HInfo->ServiceTable is not initialized and
getServiceTable() may leave it intact. It will cause crash on
freeServiceTable() called from UpnpUnRegisterRootDevice().
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
SF Bug Tracker id 3496702 - TvDeviceStop is called even if Start failed
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-03 20:35:08 PST
In sample tvdevice, error of device_main() is not handled, and
TvDeviceStop() cause crash.

View File

@ -851,6 +851,7 @@ int UpnpRegisterRootDevice(
*/
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
"UpnpRegisterRootDevice: Gena Check\n");
memset(&HInfo->ServiceTable, 0, sizeof(HInfo->ServiceTable));
hasServiceTable = getServiceTable(
(IXML_Node *)HInfo->DescDocument,
&HInfo->ServiceTable,