guard against NaN in path is rect
Recent rewrite of SkPath::isRect() did not check against sequences with NaN and infinity. R=kjlubick@google.com Bug: oss-fuzz:7882 Change-Id: I9315f68e4c53c37fda819adc6d57d6b3e3acc1c6 Reviewed-on: https://skia-review.googlesource.com/122783 Commit-Queue: Cary Clark <caryclark@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Cary Clark <caryclark@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
8f88d89796
commit
1eece78318
@ -480,6 +480,9 @@ bool SkPath::isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts
|
||||
if (lineDelta.fX && lineDelta.fY) {
|
||||
return false; // diagonal
|
||||
}
|
||||
if (!lineDelta.isFinite()) {
|
||||
return false; // path contains infinity or NaN
|
||||
}
|
||||
if (lineStart == lineEnd) {
|
||||
break; // single point on side OK
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user