diff options
author | Cary Clark <caryclark@skia.org> | 2018-07-26 07:40:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-26 12:04:17 +0000 |
commit | b64db38b854bd8f6d564b7741ebf4795d130d168 (patch) | |
tree | 12de5b7f2a6ef40db9655e036be53c821ceb50f4 /src | |
parent | f3ac64df17419f7fa6af2eeed5092638e956e196 (diff) |
avoid uninitialized under fuzzer
https://skia-review.googlesource.com/143112
introduced new logic to handle failures;
fuzzer found a way to exploit this.
FWIW, skia's fuzzer did not call pathops when
fed the test case.
TBR=kjlubick@google.com
Bug:867314
Change-Id: Id894962d3f32e206362faff332a1330db75da175
Reviewed-on: https://skia-review.googlesource.com/143318
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pathops/SkOpSegment.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp index 14863e0b52..cbf1c36f73 100644 --- a/src/pathops/SkOpSegment.cpp +++ b/src/pathops/SkOpSegment.cpp @@ -353,7 +353,7 @@ bool SkOpSegment::ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle } SkOpSegment* nextSegment = nextAngle->segment(); int maxWinding, sumWinding; - SkOpSpanBase* last; + SkOpSpanBase* last = nullptr; if (binary) { int oppMaxWinding, oppSumWinding; nextSegment->setUpWindings(nextAngle->start(), nextAngle->end(), &sumMiWinding, @@ -388,7 +388,7 @@ bool SkOpSegment::ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngl } SkOpSegment* nextSegment = nextAngle->segment(); int maxWinding, sumWinding; - SkOpSpanBase* last; + SkOpSpanBase* last = nullptr; if (binary) { int oppMaxWinding, oppSumWinding; nextSegment->setUpWindings(nextAngle->end(), nextAngle->start(), &sumMiWinding, |