summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordyamy-lee <dyamy.lee@samsung.com>2021-02-09 13:30:57 +0900
committerdyamy-lee <dyamy.lee@samsung.com>2021-02-09 18:24:19 +0900
commitbc2fb11d2f1c400d0401b9683bf1970a982f5a20 (patch)
tree0e6fac1cf2ae1ece872c9172273ac6d036afc5a8
parent27ceb84822e88d8bf05fe286996d239a4fac595e (diff)
downloadfirmware-update-system-ui-bc2fb11d2f1c400d0401b9683bf1970a982f5a20.tar.gz
firmware-update-system-ui-bc2fb11d2f1c400d0401b9683bf1970a982f5a20.tar.bz2
firmware-update-system-ui-bc2fb11d2f1c400d0401b9683bf1970a982f5a20.zip
base_gui_direct : resolve the dereference before null checksubmit/tizen/20210210.033159accepted/tizen/unified/20210210.052154
Change-Id: Ic87c7df629929e3fda5ab422092c5a7c334d2f38
-rw-r--r--base/base_gui_direct.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/base_gui_direct.c b/base/base_gui_direct.c
index b951bed..676ad35 100644
--- a/base/base_gui_direct.c
+++ b/base/base_gui_direct.c
@@ -385,13 +385,19 @@ void _copy_buffers_by_rotate(void *srcptr, int srcw, int srch, int srcstride,
src_img = pixman_image_create_bits(PIXMAN_a8r8g8b8, buf_width, srch, (uint32_t*)srcptr, srcstride);
if(!src_img)
{
- LOG("No source image.\n");
+ LOG("Failed to create src pixman.\n");
return;
}
buf_width = dststride/4;
dst_img = pixman_image_create_bits(PIXMAN_a8r8g8b8, buf_width, dsth, (uint32_t*)dstptr, dststride);
+ if(!dst_img) {
+ LOG("Failed to create dst pixman\n");
+ pixman_image_unref(src_img);
+ return;
+ }
+
struct pixman_f_transform ft;
double scale_x, scale_y;
pixman_transform_t t;