Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp |
| index f8d39b99ad264cef00633c49a40f6643b3af1b64..42471343d98d7eebcada154baefdf5e9e56ab09d 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp |
| +++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp |
| @@ -136,6 +136,10 @@ size_t ICOImageDecoder::decodeFrameCount() |
| if (failed()) |
| return m_frameBufferCache.size(); |
| + // Check if there is enough data available to parse directory entries. |
| + if (m_decodedOffset < sizeOfDirectory + m_dirEntries.size() * sizeOfDirectory) |
|
Peter Kasting
2016/06/22 23:35:28
Is the problem here as follows?:
* Someone calls
aleksandar.stojiljkovic
2016/06/23 10:11:29
Yes, that's the problem.
Used your approach with t
|
| + return 0; |
| + |
| // Length of sequence of completely received frames. |
| for (size_t i = 0; i < m_dirEntries.size(); ++i) { |
| const IconDirectoryEntry& dirEntry = m_dirEntries[i]; |