Bug 1418447 - Limit Skia edge builder allocations. r=milan

MozReview-Commit-ID: 1SnxwtoYJJm
This commit is contained in:
Lee Salzman 2017-11-21 16:55:20 -05:00
parent 234a166e83
commit 6ac81c37ea

View File

@ -248,6 +248,7 @@ int SkEdgeBuilder::buildPoly(const SkPath& path, const SkIRect* iclip, int shift
// clipping can turn 1 line into (up to) kMaxClippedLineSegments, since
// we turn portions that are clipped out on the left/right into vertical
// segments.
SkASSERT_RELEASE(maxEdgeCount <= std::numeric_limits<int>::max() / SkLineClipper::kMaxClippedLineSegments);
maxEdgeCount *= SkLineClipper::kMaxClippedLineSegments;
}