summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-01-27 12:05:59 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-01-27 12:07:38 -0500
commitcbf2aa2bf99d54cdcc3cf68966b6630c9094a547 (patch)
tree4523ccc904c6987b5369d11bb714f4307975e20e
parent5b30f95e62c9de77a53a7b18a4ebbffb42dceadc (diff)
downloadefl-cbf2aa2bf99d54cdcc3cf68966b6630c9094a547.tar.gz
evas: Fix explicit NULL dereference
This patch fixes an Coverity issue that if 'dst' gets set to NULL (as can happen above) then this eo_do call may segfault as it is directly accessing 'dst->buffer'. @fix CID1347415 Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/evas/filters/evas_filter_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/evas/filters/evas_filter_utils.c b/src/lib/evas/filters/evas_filter_utils.c
index 802f09aad9..ec843016a7 100644
--- a/src/lib/evas/filters/evas_filter_utils.c
+++ b/src/lib/evas/filters/evas_filter_utils.c
@@ -63,7 +63,8 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
end:
if (src_map) eo_do(src->buffer, ector_buffer_unmap(src_map, src_len));
- if (dst_map) eo_do(dst->buffer, ector_buffer_unmap(dst_map, dst_len));
+ if ((dst) && (dst_map))
+ eo_do(dst->buffer, ector_buffer_unmap(dst_map, dst_len));
DEBUG_TIME_END();
return dst;
}