From 7435073c7ab5e107446e3d6fff5b9eb49b1ae8a1 Mon Sep 17 00:00:00 2001 From: rohit Date: Tue, 2 Feb 2021 19:01:16 +0530 Subject: [PATCH] [NULL CHECK] : SVACE issue fix Change-Id: I7d722337d245a7d9eb7b86e8bf26466dbc83c923 --- src/here_view_objects.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/here_view_objects.cpp b/src/here_view_objects.cpp index 0938074..c137085 100644 --- a/src/here_view_objects.cpp +++ b/src/here_view_objects.cpp @@ -548,6 +548,10 @@ bool HereViewObjects::__resizeBitmap(unsigned char **curBmp, int curWidth, int c if (curWidth == newWidth && curHeight == newHeight) return false; unsigned char *newBmp = (unsigned char*)malloc(newWidth * newHeight * 4); + if(!newBmp) { + MAPS_LOGD("malloc failed for newBmp"); + return false; + } double scaleWidth = (double)newWidth / (double)curWidth; double scaleHeight = (double)newHeight / (double)curHeight; -- 2.34.1