aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-11 17:10:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-11 21:49:17 +0000
commit3202ac4d24de417a69c2557a37e5e1b5f70667e0 (patch)
treee5a2cff74096cf0ea62f6b6e58bf9a9c0bcb1f56 /src/core/SkDraw.cpp
parente6bbae787db50ca79f063213a72797ffc89c6557 (diff)
Revert "Revert "reject large paths to avoid potential float overflows""
This reverts commit b8f0709aac43cfdefdbf3a307f8c2ecfc0c55d27. Attempted fix: update the iData before we return. Bug: oss-fuzz:8131 Change-Id: If60b8b45df4dcb1deecc18f58cb09644aaa3231d Reviewed-on: https://skia-review.googlesource.com/127501 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 34f5da5cfe..27cf66da91 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -951,6 +951,12 @@ SkScalar SkDraw::ComputeResScaleForStroking(const SkMatrix& matrix) {
void SkDraw::drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawCoverage,
SkBlitter* customBlitter, bool doFill, SkInitOnceData* iData) const {
+ if (SkPathPriv::TooBigForMath(devPath)) {
+ if (iData) {
+ iData->setEmptyDrawFn();
+ }
+ return;
+ }
SkBlitter* blitter = nullptr;
SkAutoBlitterChoose blitterStorage;
if (nullptr == customBlitter) {