aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsCommon.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2014-09-19 06:33:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-19 06:33:31 -0700
commit630240d18805faf81d8e75172496ad165c2226b2 (patch)
tree6d025f6779c443536192fd93a23ad2b74e4174c9 /src/pathops/SkPathOpsCommon.cpp
parent65b48952d7253faf44feb91dfe8953295b1600d0 (diff)
fail early if coincidence can't be resolved
Bail out if a very large value causes coincidence resolution to fail. TBR= BUG=415866 Author: caryclark@google.com Review URL: https://codereview.chromium.org/585913002
Diffstat (limited to 'src/pathops/SkPathOpsCommon.cpp')
-rw-r--r--src/pathops/SkPathOpsCommon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp
index 9a8a2cf4e3..f7b7273a8d 100644
--- a/src/pathops/SkPathOpsCommon.cpp
+++ b/src/pathops/SkPathOpsCommon.cpp
@@ -699,7 +699,9 @@ bool HandleCoincidence(SkTArray<SkOpContour*, true>* contourList, int total) {
#if DEBUG_SHOW_WINDING
SkOpContour::debugShowWindingValues(contourList);
#endif
- CoincidenceCheck(contourList, total);
+ if (!CoincidenceCheck(contourList, total)) {
+ return false;
+ }
#if DEBUG_SHOW_WINDING
SkOpContour::debugShowWindingValues(contourList);
#endif