aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-13 13:36:34 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-13 18:05:16 +0000
commitb06a1eb4e5793b5053981cc76c72c497650c0e1a (patch)
treee2dd470121cf18caac62bc68b95d741acc5fee2c /src/effects
parentec48812c5a5416595d97745715a6cd10ad60fc33 (diff)
detect overflow for morphology
Bug: oss-fuzz:8236 Change-Id: Iae911d995cbfed77c5d332f615da1a8d9b487c21 Reviewed-on: https://skia-review.googlesource.com/127703 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 9b81b45a6f..6ee409ef06 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -457,7 +457,7 @@ static void apply_morphology_pass(GrRenderTargetContext* renderTargetContext,
middleSrcRect.inset(0, radius);
middleDstRect.inset(0, radius);
}
- if (middleSrcRect.fLeft - middleSrcRect.fRight >= 0) {
+ if (middleSrcRect.width() <= 0) {
// radius covers srcRect; use bounds over entire draw
apply_morphology_rect(renderTargetContext, clip, std::move(textureProxy),
srcRect, dstRect, radius, morphType, bounds, direction);