fix a couple pathops fuzzers

This fixes these:
 src/pathops/SkOpCoincidence.cpp -- 1 crash-causing fuzzes
 src/pathops/SkOpSpan.h -- 1 crash-causing fuzzes

R=kjlubick@google.com

Bug: skia:
Change-Id: I2b0dbd74757a32e522901753e2e17114a1a9f79b
Reviewed-on: https://skia-review.googlesource.com/113751
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Cary Clark 2018-03-12 14:41:45 -04:00 committed by Skia Commit-Bot
parent 4ce53a6ffd
commit 2f06a53b25

View File

@ -692,7 +692,7 @@ bool SkOpCoincidence::addOrOverlap(SkOpSegment* coinSeg, SkOpSegment* oppSeg,
return true;
}
SkASSERT(!cs || !cs->deleted());
SkASSERT(!os || !os->deleted());
FAIL_IF(os && os->deleted());
SkASSERT(!ce || !ce->deleted());
FAIL_IF(oe && oe->deleted());
const SkOpPtT* csExisting = !cs ? coinSeg->existing(coinTs, nullptr) : nullptr;
@ -1095,6 +1095,7 @@ bool SkOpCoincidence::apply(DEBUG_COIN_DECLARE_ONLY_PARAMS()) {
SkDebugf("seg=%d span=%d windValue=%d oppValue=%d\n", oSegment->debugID(),
oStart->debugID(), oWindValue, oOppValue);
#endif
FAIL_IF(windValue == -1);
start->setWindValue(windValue);
start->setOppValue(oppValue);
FAIL_IF(oWindValue == -1);