Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: src/pathops/SkOpCoincidence.cpp

Issue 2186973002: fuzz wednesday (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add 631992 Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkOpCoincidence.h ('k') | src/pathops/SkOpSpan.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpCoincidence.cpp
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 5d573e38416020c80f9312991cf3a2ad101482ae..a9c3204003cc0faaf61fe5a779cf93dc5898558d 100755
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -261,7 +261,7 @@ void SkOpCoincidence::add(SkOpPtT* coinPtTStart, SkOpPtT* coinPtTEnd, SkOpPtT* o
DebugCheckAdd(fTop, coinPtTStart, coinPtTEnd, oppPtTStart, oppPtTEnd);
SkCoincidentSpans* coinRec = SkOpTAllocator<SkCoincidentSpans>::Allocate(
this->globalState()->allocator());
- coinRec->init();
+ coinRec->init(SkDEBUGCODE(fGlobalState));
coinRec->set(this->fHead, coinPtTStart, coinPtTEnd, oppPtTStart, oppPtTEnd
SkDEBUGPARAMS(fGlobalState->nextCoinID()));
fHead = coinRec;
@@ -334,6 +334,9 @@ bool SkOpCoincidence::addEndMovedSpans(const SkOpSpan* base, const SkOpSpanBase*
// description below
bool SkOpCoincidence::addEndMovedSpans(const SkOpPtT* ptT) {
+ if (!ptT->span()->upCastable()) {
+ return false;
+ }
const SkOpSpan* base = ptT->span()->upCast();
const SkOpSpan* prev = base->prev();
if (!prev) {
@@ -1368,6 +1371,9 @@ bool SkOpCoincidence::mark() {
SkOpSpanBase* next = start;
SkOpSpanBase* oNext = oStart;
while ((next = next->upCast()->next()) != end) {
+ if (!next->upCastable()) {
+ return false;
+ }
if (!next->upCast()->insertCoincidence(oSegment, flipped)) {
return false;
}
« no previous file with comments | « src/pathops/SkOpCoincidence.h ('k') | src/pathops/SkOpSpan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698