зеркало из https://github.com/mozilla/pjs.git
bug 109411, prevent malloc of 0, c=pedemonte, r=morse, sr=alecf
This commit is contained in:
Родитель
6dff931971
Коммит
9b1c2f6ee0
|
@ -1109,6 +1109,12 @@ si_GetURLAndUserForChangeForm(nsIPrompt* dialog, const nsString& password)
|
|||
}
|
||||
}
|
||||
|
||||
/* avoid malloc of zero */
|
||||
if( user_count == 0 )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* allocate lists for maximumum possible url and user names */
|
||||
list = (PRUnichar**)PR_Malloc(user_count*sizeof(PRUnichar*));
|
||||
users = (si_SignonUserStruct **) PR_Malloc(user_count*sizeof(si_SignonUserStruct*));
|
||||
|
|
Загрузка…
Ссылка в новой задаче