check for non-finite values in point3 case
Bug: oss-fuzz:20581 Bug: 1050296 Change-Id: I3059bc95fc9f54d1cb2f228101065b03167762a0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270636 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
3bf3b92dfa
commit
7c81245a18
@ -333,6 +333,10 @@ void SkDraw::drawVertices(SkVertices::VertexMode vmode, int vertexCount,
|
|||||||
if (usePerspective) {
|
if (usePerspective) {
|
||||||
dev3 = outerAlloc.makeArray<SkPoint3>(vertexCount);
|
dev3 = outerAlloc.makeArray<SkPoint3>(vertexCount);
|
||||||
fMatrix->mapHomogeneousPoints(dev3, vertices, vertexCount);
|
fMatrix->mapHomogeneousPoints(dev3, vertices, vertexCount);
|
||||||
|
// similar to the bounds check for 2d points (below)
|
||||||
|
if (!SkScalarsAreFinite((const SkScalar*)dev3, vertexCount * 3)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
devVerts = outerAlloc.makeArray<SkPoint>(vertexCount);
|
devVerts = outerAlloc.makeArray<SkPoint>(vertexCount);
|
||||||
fMatrix->mapPoints(devVerts, vertices, vertexCount);
|
fMatrix->mapPoints(devVerts, vertices, vertexCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user