Index: Source/platform/image-decoders/bmp/BMPImageDecoder.cpp |
diff --git a/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp b/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp |
index 4d0dcc47ce65f6145a106307f9d2e7350ad815b6..9b2a4d654748d1e17b0f4df7e7f8769227b1b8f9 100644 |
--- a/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp |
+++ b/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp |
@@ -110,7 +110,7 @@ void BMPImageDecoder::decode(bool onlySize) |
bool BMPImageDecoder::decodeHelper(bool onlySize) |
{ |
size_t imgDataOffset = 0; |
- if ((m_decodedOffset < sizeOfFileHeader) && !processFileHeader(&imgDataOffset)) |
+ if ((m_decodedOffset < sizeOfFileHeader) && !processFileHeader(imgDataOffset)) |
return false; |
if (!m_reader) { |
@@ -124,16 +124,14 @@ bool BMPImageDecoder::decodeHelper(bool onlySize) |
return m_reader->decodeBMP(onlySize); |
} |
-bool BMPImageDecoder::processFileHeader(size_t* imgDataOffset) |
+bool BMPImageDecoder::processFileHeader(size_t& imgDataOffset) |
{ |
- ASSERT(imgDataOffset); |
- |
// Read file header. |
ASSERT(!m_decodedOffset); |
if (m_data->size() < sizeOfFileHeader) |
return false; |
const uint16_t fileType = (m_data->data()[0] << 8) | static_cast<uint8_t>(m_data->data()[1]); |
- *imgDataOffset = readUint32(10); |
+ imgDataOffset = readUint32(10); |
m_decodedOffset = sizeOfFileHeader; |
// See if this is a bitmap filetype we understand. |