From 26ae5aba592d4169c1c53aa7fafa660589a4d554 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Mon, 12 Dec 2016 13:57:56 -0500 Subject: fix fuzz Don't walk off the end if the loop doesn't contain the expected value. R=kjlubick@google.com BUG=skia:6047 Change-Id: I96815180dc7c92b45691037ae6c4b40beedc009a Reviewed-on: https://skia-review.googlesource.com/5845 Reviewed-by: Kevin Lubick Commit-Queue: Cary Clark --- src/pathops/SkOpCoincidence.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp index 1ade4446a3..557da0a56e 100644 --- a/src/pathops/SkOpCoincidence.cpp +++ b/src/pathops/SkOpCoincidence.cpp @@ -1004,6 +1004,7 @@ bool SkOpCoincidence::apply(DEBUG_COIN_DECLARE_ONLY_PARAMS()) { if (oNext == oEnd) { break; } + FAIL_IF(!oNext->upCastable()); oStart = oNext->upCast(); } while (true); } -- cgit v1.2.3