From ea7558fbed41bc58990df7edbbc7e4f9909b2223 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Mon, 17 Nov 2003 20:44:14 +0000 Subject: [PATCH] Bug 225986 DRefTool analysis for libjar files r=roc sr=roc --- modules/libjar/nsJAR.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp index dd5e42ea13a1..0e0e155499b1 100644 --- a/modules/libjar/nsJAR.cpp +++ b/modules/libjar/nsJAR.cpp @@ -645,7 +645,9 @@ nsJAR::ParseOneFile(nsISignatureVerifier* verifier, nsJARManifestItem* curItemMF = nsnull; PRBool foundName = PR_FALSE; if (aFileType == JAR_MF) - curItemMF = new nsJARManifestItem(); + if (!(curItemMF = new nsJARManifestItem())) + return NS_ERROR_OUT_OF_MEMORY; + nsCAutoString curItemName; nsCAutoString storedSectionDigest; @@ -698,7 +700,8 @@ nsJAR::ParseOneFile(nsISignatureVerifier* verifier, break; sectionStart = nextLineStart; - curItemMF = new nsJARManifestItem(); + if (!(curItemMF = new nsJARManifestItem())) + return NS_ERROR_OUT_OF_MEMORY; } // (aFileType == JAR_MF) else //-- file type is SF, compare digest with calculated