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

Unified Diff: src/core/SkColorTable.cpp

Issue 1319973008: fix bounds check for ctables (thanks Hal) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorTable.cpp
diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp
index e461a095f0d096416846c01247c0bdd99fdab135..ca9a8657c4132cc565e998522978128d89ce6f7c 100644
--- a/src/core/SkColorTable.cpp
+++ b/src/core/SkColorTable.cpp
@@ -36,7 +36,7 @@ SkColorTable::SkColorTable(SkPMColor* colors, int count, AllocatedWithMalloc)
: fColors(colors)
, fCount(count)
{
- SkASSERT(count > 0 && count <= 255);
+ SkASSERT(count > 0 && count <= 256);
SkASSERT(colors);
}
@@ -108,7 +108,7 @@ SkColorTable* SkColorTable::Create(SkReadBuffer& buffer) {
return new SkColorTable(nullptr, 0);
}
- if (count < 0 || count > 255) {
+ if (count < 0 || count > 256) {
buffer.validate(false);
return nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698