be consistent about int for incReserve

Bug: 883666
Change-Id: I4070c958ef9ac5891ea75a8ef349e3d362c97f54
Reviewed-on: https://skia-review.googlesource.com/c/162620
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 16d094c..febfd4f 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -5191,3 +5191,16 @@
     REPORTER_ASSERT(r, p.isValid());
     REPORTER_ASSERT(r, p.pathRefIsValid());
 }
+
+DEF_TEST(Path_increserve_handle_neg_crbug_883666, r) {
+    SkPath path;
+
+    path.conicTo({0, 0}, {1, 1}, SK_FloatNegativeInfinity);
+
+    // <== use a copy path object to force SkPathRef::copy() and SkPathRef::resetToSize()
+    SkPath shallowPath = path;
+
+    // make sure we don't assert/crash on this.
+    shallowPath.incReserve(0xffffffff);
+}
+