devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=38698de56402c460b203f242d58f86a0d19bd144

commit 38698de56402c460b203f242d58f86a0d19bd144
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Jun 18 10:29:06 2015 -0400

    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.mich...@samsung.com>
---
 src/lib/edje/edje_embryo.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index f3a7400..e05cb0c 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)
         if (HASNPARAMS(6))
           {
              GETSTR(tmp, params[6]);
-             if (!strcmp(tmp, "CURRENT"))
+             if ((tmp) && (!strcmp(tmp, "CURRENT")))
                anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
           }
      }
@@ -1110,7 +1110,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, 
Embryo_Cell *params)
         if (HASNPARAMS(7))
           {
              GETSTR(tmp, params[7]);
-             if (!strcmp(tmp, "CURRENT"))
+             if ((tmp) && (!strcmp(tmp, "CURRENT")))
                anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
           }
         else if (HASNPARAMS(5))
@@ -1126,7 +1126,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, 
Embryo_Cell *params)
         if (HASNPARAMS(8))
           {
              GETSTR(tmp, params[8]);
-             if (!strcmp(tmp, "CURRENT"))
+             if ((tmp) && (!strcmp(tmp, "CURRENT")))
                anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
           }
         else if (HASNPARAMS(5))
@@ -1142,7 +1142,7 @@ _edje_embryo_fn_set_state_anim(Embryo_Program *ep, 
Embryo_Cell *params)
         if (HASNPARAMS(12))
           {
              GETSTR(tmp, params[8]);
-             if (!strcmp(tmp, "CURRENT"))
+             if ((tmp) && (!strcmp(tmp, "CURRENT")))
                anim_type |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
           }
         else if (HASNPARAMS(5))

-- 


Reply via email to