Index: src/core/SkValidatingReadBuffer.cpp |
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp |
index 692d0dd4d18c83b0f7f5bd13e0bc229ba478253a..ab6a04a1cf9b3b1fa73b087b011decd0efc25f5f 100644 |
--- a/src/core/SkValidatingReadBuffer.cpp |
+++ b/src/core/SkValidatingReadBuffer.cpp |
@@ -228,6 +228,10 @@ SkTypeface* SkValidatingReadBuffer::readTypeface() { |
return NULL; |
} |
+bool SkValidatingReadBuffer::validateAvailable(size_t size) { |
+ return this->validate((size <= SK_MaxU32) && fReader.isAvailable(static_cast<uint32_t>(size))); |
+} |
+ |
SkFlattenable* SkValidatingReadBuffer::readFlattenable(SkFlattenable::Type type) { |
SkString name; |
this->readString(&name); |