248215 - firefox 091 topcrash dereferencing null protected storage system pointer.

This commit is contained in:
ben%bengoodger.com 2004-07-26 04:55:20 +00:00
parent f57f259003
commit fd29ced56b

View File

@ -773,6 +773,8 @@ nsIEProfileMigrator::GetSignonsListFromPStore(IPStore* aPStore, nsVoidArray* aSi
{
HRESULT hr;
NS_ENSURE_ARG_POINTER(aPStore);
IEnumPStoreItemsPtr enumItems;
hr = aPStore->EnumItems(0, &IEPStoreGUID, &IEPStoreGUID, 0, &enumItems);
if (SUCCEEDED(hr)) {
@ -974,8 +976,10 @@ nsIEProfileMigrator::CopyFormData(PRBool aReplace)
}
PStoreCreateInstancePtr PStoreCreateInstance = (PStoreCreateInstancePtr)::GetProcAddress(pstoreDLL, "PStoreCreateInstance");
IPStorePtr PStore;
IPStorePtr PStore = NULL;
hr = PStoreCreateInstance(&PStore, 0, 0, 0);
if (FAILED(hr) || PStore == NULL)
return NS_OK;
IEnumPStoreItemsPtr enumItems;
hr = PStore->EnumItems(0, &IEPStoreGUID, &IEPStoreGUID, 0, &enumItems);