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>
diff --git a/gm/polygonoffset.cpp b/gm/polygonoffset.cpp
index 909dddc..f70ebb0 100644
--- a/gm/polygonoffset.cpp
+++ b/gm/polygonoffset.cpp
@@ -561,7 +561,9 @@
             if (fConvexOnly) {
                 result = SkInsetConvexPolygon(data.get(), numPts, offset, &offsetPoly);
             } else {
-                result = SkOffsetSimplePolygon(data.get(), numPts, offset, &offsetPoly);
+                SkRect bounds;
+                bounds.setBoundsCheck(data.get(), numPts);
+                result = SkOffsetSimplePolygon(data.get(), numPts, bounds, offset, &offsetPoly);
             }
             if (result) {
                 SkPath path;