summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-06-18 10:29:06 -0400
committerChris Michael <cp.michael@samsung.com>2015-06-18 10:30:45 -0400
commit38698de56402c460b203f242d58f86a0d19bd144 (patch)
treed59319914e7d1182eee8cf42382bc9858de0e43c /src/lib/edje/edje_embryo.c
parentac6a91864439d346ce72cfedca93e69c8ecdb1ac (diff)
edje: Fix Coverity CID1299026 and CID1299027: Explicit null dereference
Summary: Coverity reports that this potentially is passing a NULL pointer to strcmp. As the GETSTR macro Can possible return NULL we should be checking that return before passing it to strcmp. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/edje/edje_embryo.c')
-rw-r--r--src/lib/edje/edje_embryo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index f3a740057b..e05cb0cf0a 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -1100,7 +1100,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, Embryo_Cell *params)
1100 if (HASNPARAMS(6)) 1100 if (HASNPARAMS(6))
1101 { 1101 {
1102 GETSTR(tmp, params[6]); 1102 GETSTR(tmp, params[6]);
1103 if (!strcmp(tmp, "CURRENT")) 1103 if ((tmp) && (!strcmp(tmp, "CURRENT")))
1104 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 1104 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
1105 } 1105 }
1106 } 1106 }
@@ -1110,7 +1110,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, Embryo_Cell *params)
1110 if (HASNPARAMS(7)) 1110 if (HASNPARAMS(7))
1111 { 1111 {
1112 GETSTR(tmp, params[7]); 1112 GETSTR(tmp, params[7]);
1113 if (!strcmp(tmp, "CURRENT")) 1113 if ((tmp) && (!strcmp(tmp, "CURRENT")))
1114 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 1114 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
1115 } 1115 }
1116 else if (HASNPARAMS(5)) 1116 else if (HASNPARAMS(5))
@@ -1126,7 +1126,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, Embryo_Cell *params)
1126 if (HASNPARAMS(8)) 1126 if (HASNPARAMS(8))
1127 { 1127 {
1128 GETSTR(tmp, params[8]); 1128 GETSTR(tmp, params[8]);
1129 if (!strcmp(tmp, "CURRENT")) 1129 if ((tmp) && (!strcmp(tmp, "CURRENT")))
1130 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 1130 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
1131 } 1131 }
1132 else if (HASNPARAMS(5)) 1132 else if (HASNPARAMS(5))
@@ -1142,7 +1142,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, Embryo_Cell *params)
1142 if (HASNPARAMS(12)) 1142 if (HASNPARAMS(12))
1143 { 1143 {
1144 GETSTR(tmp, params[8]); 1144 GETSTR(tmp, params[8]);
1145 if (!strcmp(tmp, "CURRENT")) 1145 if ((tmp) && (!strcmp(tmp, "CURRENT")))
1146 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT; 1146 anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
1147 } 1147 }
1148 else if (HASNPARAMS(5)) 1148 else if (HASNPARAMS(5))