make SkRBuffer always validate
BUG=skia:6102
Change-Id: Ic9fb259b2e980d00e179340945c50492f1803a4f
Reviewed-on: https://skia-review.googlesource.com/6736
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp
index b3b1831..1123cf0 100644
--- a/src/core/SkRegion.cpp
+++ b/src/core/SkRegion.cpp
@@ -1128,9 +1128,9 @@
}
size_t SkRegion::readFromMemory(const void* storage, size_t length) {
- SkRBufferWithSizeCheck buffer(storage, length);
- SkRegion tmp;
- int32_t count;
+ SkRBuffer buffer(storage, length);
+ SkRegion tmp;
+ int32_t count;
if (buffer.readS32(&count) && (count >= 0) && buffer.read(&tmp.fBounds, sizeof(tmp.fBounds))) {
if (count == 0) {