Index: src/core/SkValidatingReadBuffer.cpp |
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp |
index ae7a83684bc818dcb267f9466cb4002804ed0f07..1127a89a6037403287d7ea518a03e25a12a40cd8 100644 |
--- a/src/core/SkValidatingReadBuffer.cpp |
+++ b/src/core/SkValidatingReadBuffer.cpp |
@@ -213,9 +213,10 @@ uint32_t SkValidatingReadBuffer::getArrayCount() { |
void SkValidatingReadBuffer::readBitmap(SkBitmap* bitmap) { |
const int width = this->readInt(); |
const int height = this->readInt(); |
+ const bool useBitmapHeap = this->readBool(); |
const size_t length = this->readUInt(); |
// A size of zero means the SkBitmap was simply flattened. |
- this->validate(length == 0); |
+ this->validate(!useBitmapHeap && (0 == length)); |
if (fError) { |
Stephen White
2014/03/11 18:14:43
Nit: could this just be
if (!this->validate(...)
sugoi1
2014/03/11 18:54:04
Done.
|
return; |
} |