Index: src/core/SkBuffer.cpp |
diff --git a/src/core/SkBuffer.cpp b/src/core/SkBuffer.cpp |
index 915264d957f057840da9d831a05aa242e50132cc..32a8011ac787a34f26ab1f57869aba1b7b5e180e 100644 |
--- a/src/core/SkBuffer.cpp |
+++ b/src/core/SkBuffer.cpp |
@@ -34,6 +34,13 @@ size_t SkRBuffer::skipToAlign4() |
return n; |
} |
+void SkRBufferWithSizeCheck::read(void* buffer, size_t size) { |
+ fError = fError || (fPos + size > fStop); |
+ if (!fError && (size > 0)) { |
+ readNoSizeCheck(buffer, size); |
+ } |
+} |
+ |
void* SkWBuffer::skip(size_t size) |
{ |
void* result = fPos; |