Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1269)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp

Issue 2081013002: Re-enable DrMemory test for ICOImageDecoderTests.parseAndDecodeByteByByte. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit, comment. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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];

Powered by Google App Engine
This is Rietveld 408576698