Removing two unused variables in ssdp_server.c

Removing first TempPtr allocation in unique_service_name as well as one
of the dbgStr allocation in AdvertizeAndReply as those values were not
used.
This commit is contained in:
Fabrice Fontaine 2012-03-06 18:35:33 +01:00
parent c13b1f7e37
commit 7ef089b09a
2 changed files with 9 additions and 2 deletions

View File

@ -2,6 +2,14 @@
Version 1.6.16 Version 1.6.16
******************************************************************************* *******************************************************************************
2012-03-06 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Removing two unused variables in ssdp_server.c
Removing first TempPtr allocation in unique_service_name as well as one
of the dbgStr allocation in AdvertizeAndReply as those values were not
used.
2012-03-06 Fabrice Fontaine <fabrice.fontaine(at)orange.com> 2012-03-06 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
SF Bug Tracker id 3497714 - Buffer overflows SF Bug Tracker id 3497714 - Buffer overflows

View File

@ -152,7 +152,6 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
continue; continue;
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
"Extracting UDN for %s\n", dbgStr); "Extracting UDN for %s\n", dbgStr);
dbgStr = ixmlNode_getNodeName(tmpNode);
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
"Extracting device type\n"); "Extracting device type\n");
tmpNode2 = ixmlNodeList_item(nodeList, 0); tmpNode2 = ixmlNodeList_item(nodeList, 0);
@ -458,7 +457,7 @@ int unique_service_name(char *cmd, SsdpEvent *Evt)
int CommandFound = 0; int CommandFound = 0;
size_t n = 0; size_t n = 0;
if ((TempPtr = strstr(cmd, "uuid:schemas")) != NULL) { if (strstr(cmd, "uuid:schemas") != NULL) {
ptr1 = strstr(cmd, ":device"); ptr1 = strstr(cmd, ":device");
if (ptr1 != NULL) if (ptr1 != NULL)
ptr2 = strstr(ptr1 + 1, ":"); ptr2 = strstr(ptr1 + 1, ":");