detect non-finite pts

Bug: oss-fuzz:6638
Change-Id: I72dab6783099facbe8d658ec1bc4b175a383e174
Reviewed-on: https://skia-review.googlesource.com/114565
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2018-03-15 14:33:39 -04:00 committed by Skia Commit-Bot
parent f6148b6d23
commit e11d793294

View File

@ -511,6 +511,9 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count,
n = MAX_DEV_PTS;
}
matrix->mapPoints(devPts, pts, n);
if (!SkScalarsAreFinite(&devPts[0].fX, n * 2)) {
return;
}
proc(rec, devPts, n, bltr);
pts += n - backup;
SkASSERT(SkToInt(count) >= n);