summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2020-08-03 20:22:08 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2020-08-03 20:32:33 +0900
commit9dde786ffeebcac4975f3a1e2084b860d1087a2f (patch)
treebf283093a8b524690b33fbb3c3fe03c093fad97b
parent6f981794ad64c1c43a7c79d9d8de4999aa600318 (diff)
edje_embryo: fix null pointer dereference in ALLOC_COPY_DESC
To fix null pointer dereference in ALLOC_COPY_DESC, allocated variable "new" is checked.
-rw-r--r--src/lib/edje/edje_embryo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index ef4c3f8ef9..b4ffbfc32d 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -2102,6 +2102,7 @@ case EDJE_PART_TYPE_##Short: \
2102 Edje_Part_Description_##Type * new; \ 2102 Edje_Part_Description_##Type * new; \
2103 tmp = (Edje_Part_Description_##Type *)parent; \ 2103 tmp = (Edje_Part_Description_##Type *)parent; \
2104 new = calloc(1, sizeof (Edje_Part_Description_##Type)); \ 2104 new = calloc(1, sizeof (Edje_Part_Description_##Type)); \
2105 if (!new) break; \
2105 new->Spec = tmp->Spec; \ 2106 new->Spec = tmp->Spec; \
2106 To = &new->common; \ 2107 To = &new->common; \
2107 break; \ 2108 break; \