Bug 1909771 - Avoid UndefinedBehavior mailnews/compose/src/nsMsgCompose.cpp. r=babolivier
Differential Revision: https://phabricator.services.mozilla.com/D217997 --HG-- extra : amend_source : f03fe441e91ab54fa13aa0d05090da61cbfc6bbf
This commit is contained in:
Родитель
fab4d6c857
Коммит
17404cd990
|
@ -1922,7 +1922,12 @@ nsresult nsMsgCompose::CreateMessage(const nsACString& originalMsgURI,
|
|||
}
|
||||
}
|
||||
isFirstPass = false;
|
||||
uri = nextUri + 1;
|
||||
if (nextUri) {
|
||||
// `nextUri` can be a null pointer if `strstr` did not find `://` in the
|
||||
// URI earlier. Only increment it if that is not the case, to avoid
|
||||
// undefined behaviors.
|
||||
uri = nextUri + 1;
|
||||
}
|
||||
} while (nextUri);
|
||||
PR_Free(uriList);
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче