diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-07-23 10:00:49 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-07-23 10:00:49 -0500 |
| commit | e91db62f1be2eeeb3fb3d5f71cfafcfcb98e13a5 (patch) | |
| tree | b9f76ba578e022b87df41b22bae4aadb70ad3496 /Source | |
| parent | 008b907bf0ffd7a48a0035bbc8663c827e07d7b9 (diff) | |
| parent | cd8b65bd8a73f1c8fd7c8ac1abeda1b5c1b5c50e (diff) | |
Merge pull request #663 from moshekaplan/patch-1
Prevent potential buffer overflow in sscanf
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinWX/Android/ButtonManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Android/ButtonManager.cpp b/Source/Core/DolphinWX/Android/ButtonManager.cpp index 5c2e5d1cc3..c6d70f3c5e 100644 --- a/Source/Core/DolphinWX/Android/ButtonManager.cpp +++ b/Source/Core/DolphinWX/Android/ButtonManager.cpp @@ -117,13 +117,13 @@ namespace ButtonManager { hasbind = true; type = BIND_AXIS; - sscanf(value.c_str(), "Device '%[^\']'-Axis %d%c", dev, &bindnum, &modifier); + sscanf(value.c_str(), "Device '%127[^\']'-Axis %d%c", dev, &bindnum, &modifier); } else if (std::string::npos != value.find("Button")) { hasbind = true; type = BIND_BUTTON; - sscanf(value.c_str(), "Device '%[^\']'-Button %d", dev, &bindnum); + sscanf(value.c_str(), "Device '%127[^\']'-Button %d", dev, &bindnum); } if (hasbind) AddBind(std::string(dev), new sBind(padID, configTypes[a], type, bindnum, modifier == '-' ? -1.0f : 1.0f)); |
