aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2017-01-03 10:47:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-03 16:27:36 +0000
commit5a2057aee9c6293c3dc78cfb013c06ea707d39e4 (patch)
treef7bc84856e550ffe619b3e522ffe060357540385 /src/pathops
parent32bf449c0ff891c5fd400e5f60ac24cc428dd45e (diff)
fix fuzzer
abort if incoming data is out of range TBR=reed@google.com BUG=676866 Change-Id: I7d4850611654a399e32ea2012b23ca369dc53e70 Reviewed-on: https://skia-review.googlesource.com/6525 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/pathops')
-rw-r--r--src/pathops/SkOpCoincidence.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 9f841114d5..f9ec15709e 100644
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -996,7 +996,9 @@ bool SkOpCoincidence::apply(DEBUG_COIN_DECLARE_ONLY_PARAMS()) {
return true;
}
do {
- SkOpSpan* start = coin->coinPtTStartWritable()->span()->upCast();
+ SkOpSpanBase* startSpan = coin->coinPtTStartWritable()->span();
+ FAIL_IF(!startSpan->upCastable());
+ SkOpSpan* start = startSpan->upCast();
if (start->deleted()) {
continue;
}