зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626318 - Protect against dataSize being absurdly large. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D69264 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5ab49ca20e
Коммит
66b826a63e
|
@ -6764,10 +6764,10 @@ bool TouchDeviceNeedsPanGestureConversion(PTOUCHINPUT aOSEvent,
|
|||
}
|
||||
HANDLE source = aOSEvent[0].hSource;
|
||||
std::string deviceName;
|
||||
UINT dataSize;
|
||||
UINT dataSize = 0;
|
||||
// The first call just queries how long the name string will be.
|
||||
GetRawInputDeviceInfoA(source, RIDI_DEVICENAME, nullptr, &dataSize);
|
||||
if (!dataSize) {
|
||||
if (!dataSize || dataSize > 0x10000) {
|
||||
return false;
|
||||
}
|
||||
deviceName.resize(dataSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче