diff options
author | caryclark <caryclark@google.com> | 2015-12-07 12:18:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-07 12:18:02 -0800 |
commit | a3375e4251c4b2cbf0b5bbdcebfe911914496881 (patch) | |
tree | f280017cf43b13cf4f9cc8cb72f29ad8500c0e21 /src/pathops/SkOpSegment.cpp | |
parent | d4c24f67496ff2e5e83bc7ce7945cbb85484bfa6 (diff) |
fix coincident fuzzer
This fuzzer has very large Y values that cause the
points to sort incorrectly by t. Exit out as soon
as this is detected.
TBR=reed@google.com
BUG=561121
Review URL: https://codereview.chromium.org/1507803002
Diffstat (limited to 'src/pathops/SkOpSegment.cpp')
-rw-r--r-- | src/pathops/SkOpSegment.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp index 3b81cf2eed..d066794cee 100644 --- a/src/pathops/SkOpSegment.cpp +++ b/src/pathops/SkOpSegment.cpp @@ -362,6 +362,9 @@ SkOpPtT* SkOpSegment::addT(double t, AllowAlias allowAlias, SkChunkAlloc* alloca } if (t < result->fT) { SkOpSpan* prev = result->span()->prev(); + if (!prev) { + return nullptr; + } SkOpSpan* span = insert(prev, allocator); span->init(this, prev, t, pt); this->debugValidate(); |