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; }