SF Bug Tracker id 3496934 - Memory leaks in getlocalhostname and UpnpGetIfInfo
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:25:42 PST LocalSock is not closed if ioctl(LocalSock, SIOCGIFCONF, &ifConf); returns an error. (cherry picked from commit bd203e780e10700b9ef7d941b5023c5f558e445d)
This commit is contained in:
parent
078b4cf2c6
commit
f25c62e65c
@ -299,6 +299,15 @@ Version 1.8.0
|
||||
Version 1.6.16
|
||||
*******************************************************************************
|
||||
|
||||
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
SF Bug Tracker id 3496934 - Memory leaks in getlocalhostname and UpnpGetIfInfo
|
||||
|
||||
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:25:42 PST
|
||||
|
||||
LocalSock is not closed if ioctl(LocalSock, SIOCGIFCONF, &ifConf);
|
||||
returns an error.
|
||||
|
||||
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
SF Bug Tracker id 3496933 - Out-of-bounds access in CheckOtherHTTPHeaders
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003 Intel Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (C) 2011 France Telecom All rights reserved.
|
||||
* Copyright (C) 2011-2012 France Telecom All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -3390,6 +3390,7 @@ int UpnpGetIfInfo(const char *IfName)
|
||||
if (ioctl(LocalSock, SIOCGIFCONF, &ifConf) < 0) {
|
||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||
"DiscoverInterfaces: SIOCGIFCONF returned error\n");
|
||||
close(LocalSock);
|
||||
return UPNP_E_INIT;
|
||||
}
|
||||
/* Cycle through the list of interfaces looking for IP addresses. */
|
||||
@ -3810,7 +3811,7 @@ int getlocalhostname(char *out, size_t out_len)
|
||||
if (nResult < 0) {
|
||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||
"DiscoverInterfaces: SIOCGIFCONF returned error\n");
|
||||
|
||||
close(LocalSock);
|
||||
return UPNP_E_INIT;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user