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

Unified Diff: src/core/SkValidatingReadBuffer.cpp

Issue 255693003: Fixed issue found by clusterfuzz (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed SkReader32::isAvailable Created 6 years, 8 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: src/core/SkValidatingReadBuffer.cpp
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index 95bf83c847d313fdd6af4dbb7ad5f6291f9eacdf..0112f18ec44d5b922d9a0e4455e6975b371577df 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -91,7 +91,7 @@ int32_t SkValidatingReadBuffer::read32() {
}
void SkValidatingReadBuffer::readString(SkString* string) {
- const size_t len = this->readInt();
+ const size_t len = this->readUInt();
sugoi1 2014/04/28 20:15:20 Using readUInt() helps 64 bit platforms, since a "
reed1 2014/04/28 20:18:02 Why is it readUInt() here, and readU32() in Reader
sugoi1 2014/04/28 20:25:06 I don't know the reason. I can see that SkReadBuff
const void* ptr = fReader.peek();
const char* cptr = (const char*)ptr;

Powered by Google App Engine
This is Rietveld 408576698