зеркало из https://github.com/mozilla/pjs.git
Bug 283513 OOM crasher [@ WSPProxy::GetInterfaces]
patch by dewildt@gmail.com r=timeless sr=jst
This commit is contained in:
Родитель
4e6e6e6f69
Коммит
4c276ee9c4
|
@ -1265,8 +1265,16 @@ WSPProxy::GetInterfaces(PRUint32 *count, nsIID * **array)
|
|||
}
|
||||
|
||||
iids[0] = NS_STATIC_CAST(nsIID *, nsMemory::Clone(mIID, sizeof(nsIID)));
|
||||
if (NS_UNLIKELY(!iids[0])) {
|
||||
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(0, iids);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
const nsIID& wsiid = NS_GET_IID(nsIWebServiceProxy);
|
||||
iids[1] = NS_STATIC_CAST(nsIID *, nsMemory::Clone(&wsiid, sizeof(nsIID)));
|
||||
if (NS_UNLIKELY(!iids[1])) {
|
||||
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(1, iids);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
*array = iids;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче