зеркало из https://github.com/mozilla/pjs.git
Bug 463039 - validate values that get passed to clearWatch. jst aWatchId > count. r/sr=jst
This commit is contained in:
Родитель
239c0534ba
Коммит
861971e255
|
@ -648,8 +648,7 @@ NS_IMETHODIMP
|
|||
nsGeolocation::ClearWatch(PRInt32 aWatchId)
|
||||
{
|
||||
PRUint32 count = mWatchingCallbacks.Length();
|
||||
|
||||
if (aWatchId < 0 || count == 0 || aWatchId > count + 1)
|
||||
if (aWatchId < 0 || count == 0 || aWatchId > count)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mWatchingCallbacks[aWatchId]->MarkCleared();
|
||||
|
|
Загрузка…
Ссылка в новой задаче