jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0862b9d08384bc1d862b90952130ec988f56b33b

commit 0862b9d08384bc1d862b90952130ec988f56b33b
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Wed Apr 6 11:25:29 2016 +0900

    Eo: Fix rare crash after call_resolve
    
    It seems that calling a @class function with an EO object
    (that was not the required Eo_Class) lead to a situation
    where func->func was NULL. And that meant a crash after
    call_resolve.
    
    The proper fix is to properly call a @class function with a
    class object.
---
 src/lib/eo/eo.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 434ab3e..d1dd8e8 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -347,12 +347,15 @@ _eo_call_resolve(Eo *eo_id, const char *func_name, 
Eo_Op_Call_Data *call, Eo_Cal
              if ((const void *)inputklass == cache->index[i].klass)
                {
                   func = (const op_type_funcs *)cache->entry[i].func;
-                  call->func = func->func;
-                  if (is_obj)
+                  if (EINA_LIKELY(func->func && func->src))
                     {
-                       call->data = (char *) obj + cache->off[i].off;
+                       call->func = func->func;
+                       if (is_obj)
+                         {
+                            call->data = (char *) obj + cache->off[i].off;
+                         }
+                       return EINA_TRUE;
                     }
-                  return EINA_TRUE;
                }
           }
 #endif

-- 


Reply via email to