| Index: src/core/SkValidatingReadBuffer.cpp
|
| diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
|
| index 96b08639361de35e29c1691308ef7af3bc733390..fd00e7d9897577950535c304400c6aadcc8be512 100644
|
| --- a/src/core/SkValidatingReadBuffer.cpp
|
| +++ b/src/core/SkValidatingReadBuffer.cpp
|
| @@ -175,7 +175,9 @@ bool SkValidatingReadBuffer::readArray(void* value, size_t size, size_t elementS
|
| const uint32_t count = this->getArrayCount();
|
| this->validate(size == count);
|
| (void)this->skip(sizeof(uint32_t)); // Skip array count
|
| + const uint64_t byteLength64 = sk_64_mul(count, elementSize);
|
| const size_t byteLength = count * elementSize;
|
| + this->validate(byteLength == byteLength64);
|
| const void* ptr = this->skip(SkAlign4(byteLength));
|
| if (!fError) {
|
| memcpy(value, ptr, byteLength);
|
|
|