зеркало из https://github.com/mozilla/pjs.git
Bug 538891 - Possible overflow at CEnumFormatEtc::Next. r=jmathies.
This commit is contained in:
Родитель
42b28cb199
Коммит
06be77e790
|
@ -121,12 +121,12 @@ CEnumFormatEtc::Next(ULONG aMaxToFetch, FORMATETC *aResult, ULONG *aNumFetched)
|
|||
if (mCurrentIdx >= mFormatList.Length())
|
||||
return S_FALSE;
|
||||
|
||||
PRInt32 left = mFormatList.Length() - mCurrentIdx;
|
||||
PRUint32 left = mFormatList.Length() - mCurrentIdx;
|
||||
|
||||
if (!left || !aMaxToFetch)
|
||||
if (!aMaxToFetch)
|
||||
return S_FALSE;
|
||||
|
||||
PRInt32 count = NS_MIN(static_cast<PRInt32>(aMaxToFetch), left);
|
||||
PRUint32 count = NS_MIN(static_cast<PRUint32>(aMaxToFetch), left);
|
||||
|
||||
PRUint32 idx = 0;
|
||||
while (count > 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче