From e41905a55a9cbe3d5ad829be3386569cf3301bed Mon Sep 17 00:00:00 2001 From: Shian-Yow Wu Date: Thu, 4 Sep 2014 19:55:00 +0200 Subject: [PATCH] Bug 1057855 - Fix error checking when calling nsZipArchive::GetItem(). r=smaug --- content/base/src/nsXMLHttpRequest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 0791da2b7076..2168f62af3f1 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -4074,8 +4074,8 @@ ArrayBufferBuilder::mapToFileInPackage(const nsCString& aFile, return rv; } nsZipItem* zipItem = zip->GetItem(aFile.get()); - if (NS_FAILED(rv)) { - return rv; + if (!zipItem) { + return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST; } // If file was added to the package as stored(uncompressed), map to the