Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: include/core/SkReader32.h

Issue 255693003: Fixed issue found by clusterfuzz (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed nit Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkValidatingReadBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkReader32.h
diff --git a/include/core/SkReader32.h b/include/core/SkReader32.h
index 7e8038d0ae3a7913cf3c5ee036b866b7720e0963..51e28ef146c062b29b2c9b5af5d98225a0911ac3 100644
--- a/include/core/SkReader32.h
+++ b/include/core/SkReader32.h
@@ -40,7 +40,7 @@ public:
const void* peek() const { return fCurr; }
size_t available() const { return fStop - fCurr; }
- bool isAvailable(size_t size) const { return fCurr + size <= fStop; }
+ bool isAvailable(size_t size) const { return size <= this->available(); }
void rewind() { fCurr = fBase; }
« no previous file with comments | « no previous file | src/core/SkValidatingReadBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698