Chromium Code Reviews| Index: src/core/SkValidatingReadBuffer.cpp |
| diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp |
| index ae7a83684bc818dcb267f9466cb4002804ed0f07..8db2c68b9aeeeae0e1492ab37cda59e77bd99c60 100644 |
| --- a/src/core/SkValidatingReadBuffer.cpp |
| +++ b/src/core/SkValidatingReadBuffer.cpp |
| @@ -213,10 +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(); |
|
reed1
2014/03/11 19:53:18
Is the corresponding writeBool() also in this CL?
sugoi1
2014/03/11 20:05:41
It was already there (see SkWriteBuffer.cpp:172, a
|
| const size_t length = this->readUInt(); |
| // A size of zero means the SkBitmap was simply flattened. |
| - this->validate(length == 0); |
| - if (fError) { |
| + if (!this->validate(!useBitmapHeap && (0 == length))) { |
| return; |
| } |
| bitmap->unflatten(*this); |