summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-12-15 11:47:41 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-12-15 11:47:41 +0000
commit1f9e528b50569eeaa1cb9502ec0db4c985c7b043 (patch)
tree50172c3eed6047e79d6b6f2aea0aad8bf6dbd7ee /src/lib
parent8d2c652104d02d5ee4d54b654ce56f8c3cdffb53 (diff)
evas: Prevent null pointer access
Summary: add null check Test Plan: N/A Reviewers: Hermet, cedric, kimcinoo, raster Reviewed By: raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12213
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/common/evas_convert_colorspace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_convert_colorspace.c b/src/lib/evas/common/evas_convert_colorspace.c
index afbac8f884..eaa365b135 100644
--- a/src/lib/evas/common/evas_convert_colorspace.c
+++ b/src/lib/evas/common/evas_convert_colorspace.c
@@ -27,6 +27,7 @@ evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride,
27 src = data; 27 src = data;
28 end = src + (stride * h); 28 end = src + (stride * h);
29 ret = malloc(w * h * sizeof(DATA32)); 29 ret = malloc(w * h * sizeof(DATA32));
30 if (!ret) return NULL;
30 31
31 dst = ret; 32 dst = ret;
32 if (has_alpha) 33 if (has_alpha)
@@ -55,6 +56,7 @@ evas_common_convert_agry88_to_argb8888(const void *data, int w, int h, int strid
55 src = data; 56 src = data;
56 end = src + ((stride >> 1) * h); 57 end = src + ((stride >> 1) * h);
57 ret = malloc(w * h * sizeof(DATA32)); 58 ret = malloc(w * h * sizeof(DATA32));
59 if (!ret) return NULL;
58 dst = ret; 60 dst = ret;
59 61
60 if (has_alpha) 62 if (has_alpha)
@@ -97,6 +99,7 @@ evas_common_convert_gry8_to_argb8888(const void *data, int w, int h, int stride,
97 src = data; 99 src = data;
98 end = src + (stride * h); 100 end = src + (stride * h);
99 ret = malloc(w * h * sizeof(DATA32)); 101 ret = malloc(w * h * sizeof(DATA32));
102 if (!ret) return NULL;
100 dst = ret; 103 dst = ret;
101 104
102 if (has_alpha) 105 if (has_alpha)