Bug 1509685 - Add more bounds checking in nsMsgDBView::UpdateDisplayMessage() to avoid crashes, take 2. r=alta88
This commit is contained in:
Родитель
3ed3e11ea4
Коммит
55b42db220
|
@ -1215,6 +1215,8 @@ nsMsgDBView::LoadMessageByViewIndex(nsMsgViewIndex aViewIndex)
|
|||
nsCOMPtr<nsIMessenger> messenger (do_QueryReferent(mMessengerWeak));
|
||||
NS_ENSURE_TRUE(messenger, NS_ERROR_FAILURE);
|
||||
messenger->OpenURL(uri);
|
||||
if (aViewIndex >= (nsMsgViewIndex)m_keys.Length())
|
||||
return NS_MSG_INVALID_DBVIEW_INDEX;
|
||||
m_currentlyDisplayedMsgKey = m_keys[aViewIndex];
|
||||
m_currentlyDisplayedMsgUri = uri;
|
||||
m_currentlyDisplayedViewIndex = aViewIndex;
|
||||
|
|
Загрузка…
Ссылка в новой задаче