aboutsummaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorJim Van Verth <jvanverth@google.com>2019-05-01 13:28:07 -0400
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-05-01 18:02:05 +0000
commita5ef39726a7b8e54d295aa8336e7d874bc33f436 (patch)
tree77feca6eefd7d26d0bf2ce7543ee46035082d1a3 /fuzz
parentb75be23bc485b3f87c7a2d3574ad5ec57c09ad51 (diff)
downloadskia-a5ef39726a7b8e54d295aa8336e7d874bc33f436.tar.gz
More polyutils fixes
Bug: chromium:954891, oss-fuzz:14079 Change-Id: Ia1ee0a15ab4bfc93e67188ff02e6aa436432a3be Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211602 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/FuzzPolyUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fuzz/FuzzPolyUtils.cpp b/fuzz/FuzzPolyUtils.cpp
index af3457b904..9a9d3883b7 100644
--- a/fuzz/FuzzPolyUtils.cpp
+++ b/fuzz/FuzzPolyUtils.cpp
@@ -17,6 +17,8 @@ DEF_FUZZ(PolyUtils, fuzz) {
for (int index = 0; index < count; ++index) {
fuzz->next(&polygon[index].fX, &polygon[index].fY);
}
+ SkRect bounds;
+ bounds.setBoundsCheck(polygon, count);
ignoreResult(SkGetPolygonWinding(polygon, count));
ignoreResult(SkIsConvexPolygon(polygon, count));
@@ -29,7 +31,7 @@ DEF_FUZZ(PolyUtils, fuzz) {
SkScalar offset;
fuzz->next(&offset);
- ignoreResult(SkOffsetSimplePolygon(polygon, count, offset, &output));
+ ignoreResult(SkOffsetSimplePolygon(polygon, count, bounds, offset, &output));
SkAutoSTMalloc<64, uint16_t> indexMap(count);
for (int index = 0; index < count; ++index) {