projects
/
platform
/
core
/
appfw
/
watchface-complication.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ec84f5
)
Fix dereference NULL issue
90/236990/1
author
hyunho
<hhstark.kang@samsung.com>
Wed, 24 Jun 2020 02:30:57 +0000
(11:30 +0900)
committer
hyunho
<hhstark.kang@samsung.com>
Wed, 24 Jun 2020 02:30:57 +0000
(11:30 +0900)
Change-Id: Idb2cd5e9083a43ad5e5dabdf005beb621e498613
Signed-off-by: hyunho <hhstark.kang@samsung.com>
watchface-complication/watchface-editable.cc
patch
|
blob
|
history
diff --git
a/watchface-complication/watchface-editable.cc
b/watchface-complication/watchface-editable.cc
index
fc1b72b
..
911ec68
100644
(file)
--- a/
watchface-complication/watchface-editable.cc
+++ b/
watchface-complication/watchface-editable.cc
@@
-603,8
+603,14
@@
extern "C" EXPORT_API int watchface_editable_candidate_color_create(
LOGE("Invalid parameter");
return WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER;
}
+
watchface_editable_color_h col =
(watchface_editable_color_h)calloc(1, sizeof(struct editable_color_));
+ if (col == nullptr) {
+ LOGE("Out of memory");
+ return WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY;
+ }
+
col->r = r;
col->g = g;
col->b = b;