From 42348327137604574157be3d08e20ffc97f0f7d9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 25 Jun 2015 15:12:32 +0900 Subject: [PATCH] Evas filters: Add some crash safety --- src/lib/evas/filters/evas_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c index 7ad28784da..5d22df2efd 100644 --- a/src/lib/evas/filters/evas_filter.c +++ b/src/lib/evas/filters/evas_filter.c @@ -1814,6 +1814,8 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int sw, int sh, (*rows) = sh; if ((*rows) > dh) (*rows) = dh; } + if ((*cols) < 0) *cols = 0; + if ((*rows) < 0) *rows = 0; } #ifdef FILTERS_DEBUG