зеркало из https://github.com/mozilla/pjs.git
Bug 334319: buffer overrun in nsPermissionManager::Read when reading an invalid cookperm.txt file, r=mvl, sr=darin
This commit is contained in:
Родитель
d76593004d
Коммит
378c0da05d
|
@ -757,6 +757,10 @@ nsPermissionManager::Read()
|
|||
type = 10*type + (c-'0');
|
||||
c = permissionString.CharAt(++index);
|
||||
}
|
||||
|
||||
if (type >= NUMBER_OF_TYPES)
|
||||
continue; // invalid type for this permission entry
|
||||
|
||||
if (index >= permissionString.Length())
|
||||
continue; // bad format for this permission entry
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче