From 9684bbff0ab86a0f6aa1bf841a74037f09348c3b Mon Sep 17 00:00:00 2001 From: Seth Fowler Date: Tue, 18 Aug 2015 10:19:28 -0700 Subject: [PATCH] Bug 1187401 (Part 3) - For consistency, call DoError if SetMetadata sees a negative size. r=tn --HG-- extra : rebase_source : 6a3c51769874b4f2b8e3b9354ff6ce0071d7a6c5 --- image/RasterImage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index 4a5c1a5e9867..b10238bfb062 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -955,6 +955,8 @@ RasterImage::SetMetadata(const ImageMetadata& aMetadata, if (aMetadata.HasSize()) { IntSize size = aMetadata.GetSize(); if (size.width < 0 || size.height < 0) { + NS_WARNING("Image has negative intrinsic size"); + DoError(); return; }