commit | 74a8296d7c47efc6e23bd978efd1fdf4dbe29eb9 | [log] [tgz] |
---|---|---|
author | Adrienne Walker <enne@chromium.org> | Mon Oct 02 13:16:47 2017 -0700 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Mon Oct 02 20:50:38 2017 +0000 |
tree | 9e057b9805dee7b8ea25e69675a2864f96dc276f | |
parent | b30d11319bac8bb7a528b6da5ddd13ac9db26996 [diff] |
Fix SkRRect validation for negative types SkRRect::fType is an int, so needs to be checked to see if it's negative. Bug: chromium: 768149 Change-Id: I6a9a019c736806d35dc1bd627fb4ddc735a0ac86 Reviewed-on: https://skia-review.googlesource.com/54024 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp index 81184b1..f2c5798 100644 --- a/src/core/SkRRect.cpp +++ b/src/core/SkRRect.cpp
@@ -553,7 +553,7 @@ } bool patchesOfNine = radii_are_nine_patch(fRadii); - if (fType > kLastType) { + if (fType < 0 || fType > kLastType) { return false; }