diff options
author | Kevin Lubick <kjlubick@google.com> | 2016-11-15 16:07:02 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-16 19:17:19 +0000 |
commit | c9f0cc8700d57d57daab0aa4de1d5c367df99ceb (patch) | |
tree | f9b19fce3a2e081b28d016355646dc16694a7d20 /fuzz/FuzzParsePath.cpp | |
parent | 1125a030c726854f94fd2b8eed49d1323fc1d038 (diff) |
Add back in min/max check on fuzzer range
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4798
Change-Id: Ia93b4eeea82dd04f0c6bd287f61d26086a0aa740
Reviewed-on: https://skia-review.googlesource.com/4798
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'fuzz/FuzzParsePath.cpp')
-rw-r--r-- | fuzz/FuzzParsePath.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fuzz/FuzzParsePath.cpp b/fuzz/FuzzParsePath.cpp index 90b99ca8e5..b9d7f6b418 100644 --- a/fuzz/FuzzParsePath.cpp +++ b/fuzz/FuzzParsePath.cpp @@ -45,7 +45,7 @@ static void add_white(Fuzz* fuzz, SkString* atom) { fuzz->nextRange(&reps, 0, 2); for (uint8_t rep = 0; rep < reps; ++rep) { uint8_t index; - fuzz->nextRange(&index, 0, SK_ARRAY_COUNT(gWhiteSpace) - 1); + fuzz->nextRange(&index, 0, (int) SK_ARRAY_COUNT(gWhiteSpace) - 1); if (gWhiteSpace[index]) { atom->append(&gWhiteSpace[index], 1); } @@ -75,7 +75,7 @@ static void add_comma(Fuzz* fuzz, SkString* atom) { SkString MakeRandomParsePathPiece(Fuzz* fuzz) { SkString atom; uint8_t index; - fuzz->nextRange(&index, 0, SK_ARRAY_COUNT(gLegal) - 1); + fuzz->nextRange(&index, 0, (int) SK_ARRAY_COUNT(gLegal) - 1); const Legal& legal = gLegal[index]; gEasy ? atom.append("\n") : add_white(fuzz, &atom); bool b; |