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>
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp
index 14863e0..cbf1c36 100644
--- a/src/pathops/SkOpSegment.cpp
+++ b/src/pathops/SkOpSegment.cpp
@@ -353,7 +353,7 @@
}
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 @@
}
SkOpSegment* nextSegment = nextAngle->segment();
int maxWinding, sumWinding;
- SkOpSpanBase* last;
+ SkOpSpanBase* last = nullptr;
if (binary) {
int oppMaxWinding, oppSumWinding;
nextSegment->setUpWindings(nextAngle->end(), nextAngle->start(), &sumMiWinding,