зеркало из https://github.com/mozilla/pjs.git
Bug #97497 --> Try to protect against a crash in nsUint32Array where the server may be giving us a bogus message key.
r=naving sr=bienvenu
This commit is contained in:
Родитель
3b1e15e6fd
Коммит
53624e26de
|
@ -164,6 +164,10 @@ NS_IMETHODIMP nsImapFlagAndUidState::Reset(PRUint32 howManyLeft)
|
||||||
|
|
||||||
NS_IMETHODIMP nsImapFlagAndUidState::ExpungeByIndex(PRUint32 msgIndex)
|
NS_IMETHODIMP nsImapFlagAndUidState::ExpungeByIndex(PRUint32 msgIndex)
|
||||||
{
|
{
|
||||||
|
// protect ourselves in case the server gave us an index key of -1.....
|
||||||
|
if ((PRInt32) msgIndex < 0)
|
||||||
|
return NS_ERROR_INVALID_ARG;
|
||||||
|
|
||||||
PRUint32 counter = 0;
|
PRUint32 counter = 0;
|
||||||
|
|
||||||
if ((PRUint32) fNumberOfMessagesAdded < msgIndex)
|
if ((PRUint32) fNumberOfMessagesAdded < msgIndex)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче