diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/mhtml/mhtml_archive.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/mhtml/mhtml_archive.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/platform/mhtml/mhtml_archive.cc b/chromium/third_party/blink/renderer/platform/mhtml/mhtml_archive.cc index 9319926f6c7..5d3cc087814 100644 --- a/chromium/third_party/blink/renderer/platform/mhtml/mhtml_archive.cc +++ b/chromium/third_party/blink/renderer/platform/mhtml/mhtml_archive.cc @@ -149,6 +149,10 @@ MHTMLArchive::MHTMLArchive() = default; MHTMLArchive* MHTMLArchive::Create(const KURL& url, scoped_refptr<const SharedBuffer> data) { + // |data| may be null if archive file is empty. + if (!data) + return nullptr; + // MHTML pages can only be loaded from local URLs, http/https URLs, and // content URLs(Android specific). The latter is now allowed due to full // sandboxing enforcement on MHTML pages. |