| Index: src/core/SkValidatingReadBuffer.cpp
|
| diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
|
| index 0ffe650787fe7b698ad0dc17b32568517e28dd1f..a0e1a4179f2cd18ff431203aa8b1091102a68ec7 100644
|
| --- a/src/core/SkValidatingReadBuffer.cpp
|
| +++ b/src/core/SkValidatingReadBuffer.cpp
|
| @@ -44,7 +44,12 @@ const void* SkValidatingReadBuffer::skip(size_t size) {
|
| // true, which the caller should check to see if an error occurred during the read operation.
|
|
|
| bool SkValidatingReadBuffer::readBool() {
|
| - return this->readInt() != 0;
|
| + uint32_t value = this->readInt();
|
| + // Boolean value should be either 0 or 1
|
| + if (value & ~1) {
|
| + fError = true;
|
| + }
|
| + return value != 0;
|
| }
|
|
|
| SkColor SkValidatingReadBuffer::readColor() {
|
|
|