Fixed bad memory access
BUG=323595 R=senorblanco@google.com, reed@google.com, sugoi@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/88643004 git-svn-id: http://skia.googlecode.com/svn/trunk@12410 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
1eeeaabfdc
commit
72ca2654ef
@ -203,7 +203,7 @@ bool SkValidatingReadBuffer::readScalarArray(SkScalar* values, size_t size) {
|
||||
uint32_t SkValidatingReadBuffer::getArrayCount() {
|
||||
const size_t inc = sizeof(uint32_t);
|
||||
fError = fError || !IsPtrAlign4(fReader.peek()) || !fReader.isAvailable(inc);
|
||||
return *(uint32_t*)fReader.peek();
|
||||
return fError ? 0 : *(uint32_t*)fReader.peek();
|
||||
}
|
||||
|
||||
void SkValidatingReadBuffer::readBitmap(SkBitmap* bitmap) {
|
||||
|
Loading…
Reference in New Issue
Block a user