diff options
author | elupus <elupus@svn> | 2010-10-19 22:33:17 +0000 |
---|---|---|
committer | elupus <elupus@svn> | 2010-10-19 22:33:17 +0000 |
commit | 95df1d019cb7ea64a6f748a9104db1ecd666af42 (patch) | |
tree | 201ff989e602040f229a6dfae0b4744cdcef8194 | |
parent | 1233eeff9b4a7e2eebd48ddf7cbbd02fdf4734d2 (diff) |
fixed: specify max string length in sscanf format, to avoid overflows on upnp SSDP notifies
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34865 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/lib/libUPnP/Platinum/Source/Core/PltCtrlPoint.cpp | 2 | ||||
-rw-r--r-- | xbmc/lib/libUPnP/Platinum/Source/Core/PltDeviceHost.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/lib/libUPnP/Platinum/Source/Core/PltCtrlPoint.cpp b/xbmc/lib/libUPnP/Platinum/Source/Core/PltCtrlPoint.cpp index 6d925e9262..e66de1a188 100644 --- a/xbmc/lib/libUPnP/Platinum/Source/Core/PltCtrlPoint.cpp +++ b/xbmc/lib/libUPnP/Platinum/Source/Core/PltCtrlPoint.cpp @@ -853,7 +853,7 @@ PLT_CtrlPoint::ProcessSsdpNotify(NPT_HttpRequest& request, char tmp_nt[200]; int ret; //FIXME: no sscanf! - ret = sscanf(((const char*)*usn)+5, "%[^::]::%s", + ret = sscanf(((const char*)*usn)+5, "%199[^::]::%199s", tmp_uuid, tmp_nt); if (ret != 2) diff --git a/xbmc/lib/libUPnP/Platinum/Source/Core/PltDeviceHost.cpp b/xbmc/lib/libUPnP/Platinum/Source/Core/PltDeviceHost.cpp index f37299e6ee..74dc0c6ce1 100644 --- a/xbmc/lib/libUPnP/Platinum/Source/Core/PltDeviceHost.cpp +++ b/xbmc/lib/libUPnP/Platinum/Source/Core/PltDeviceHost.cpp @@ -463,7 +463,7 @@ PLT_DeviceHost::ProcessHttpPostRequest(NPT_HttpRequest& request, char soap_action_name[100]; int ret; //FIXME: no sscanf - ret = sscanf(soap_action_header, "%[^#]#%s", + ret = sscanf(soap_action_header, "%199[^#]#%99s", prefix, soap_action_name); if (ret != 2) |