зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1342349 - Fix out-of-bounds access in GetInfoForSelf. r=mstange
This commit is contained in:
Родитель
70c54fb418
Коммит
3f1fdf3508
|
@ -128,7 +128,7 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
|
|||
}
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i <= modulesNum; i++) {
|
||||
for (const auto& hMod : hMods) {
|
||||
nsID pdbSig;
|
||||
uint32_t pdbAge;
|
||||
nsAutoString pdbNameStr;
|
||||
|
@ -136,12 +136,12 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
|
|||
std::string breakpadId;
|
||||
WCHAR modulePath[MAX_PATH + 1];
|
||||
|
||||
if (!GetModuleFileNameEx(hProcess, hMods[i], modulePath, sizeof(modulePath) / sizeof(WCHAR))) {
|
||||
if (!GetModuleFileNameEx(hProcess, hMod, modulePath, sizeof(modulePath) / sizeof(WCHAR))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
MODULEINFO module = {0};
|
||||
if (!GetModuleInformation(hProcess, hMods[i], &module, sizeof(MODULEINFO))) {
|
||||
if (!GetModuleInformation(hProcess, hMod, &module, sizeof(MODULEINFO))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче