| Index: third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp
|
| diff --git a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp
|
| index 0ee27a6cd0630716f58445f3d3dfc4242a98b676..f244e9b36eeabb949b9fd823873dc0e16271a386 100644
|
| --- a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp
|
| @@ -307,6 +307,11 @@ bool BMPImageReader::readInfoHeader()
|
|
|
| // Detect top-down BMPs.
|
| if (m_infoHeader.biHeight < 0) {
|
| + // We can't negate INT32_MIN below to get a positive int32_t.
|
| + // isInfoHeaderValid() will reject heights of 1 << 16 or larger anyway,
|
| + // so just reject this bitmap now.
|
| + if (m_infoHeader.biHeight == INT32_MIN)
|
| + return m_parent->setFailed();
|
| m_isTopDown = true;
|
| m_infoHeader.biHeight = -m_infoHeader.biHeight;
|
| }
|
|
|