Bug 1168009 - heap-use-after-free (ASAN build) in updater.cpp mstrtok. r=spohl

This commit is contained in:
Robert Strong 2015-06-01 11:52:08 -07:00
parent 3a593f903e
commit fd8806d185

View File

@ -307,8 +307,10 @@ mmin(size_t a, size_t b)
static NS_tchar*
mstrtok(const NS_tchar *delims, NS_tchar **str)
{
if (!*str || !**str)
if (!*str || !**str) {
*str = nullptr;
return nullptr;
}
// skip leading "whitespace"
NS_tchar *ret = *str;