q66 pushed a commit to branch master.

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

commit f800e8a3bfe0a36ddc55b8d0498a252727c0ec3c
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Wed Jun 17 10:29:16 2015 +0100

    eolian: check for C type keyword before trying to append as C type keyword
    
    This fixes a segv when non-type Eolian keyword is used.
    
    @fix
---
 src/lib/eolian/database_type.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index f3a3a6f..787cc3d 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -209,8 +209,10 @@ database_type_to_str(const Eolian_Type *tp, Eina_Strbuf 
*buf, const char *name)
              eina_strbuf_append_char(buf, '_');
           }
         int kw = eo_lexer_keyword_str_to_id(tp->name);
-        if (kw) eina_strbuf_append(buf, eo_lexer_get_c_type(kw));
-        else eina_strbuf_append(buf, tp->name);
+        if (kw && eo_lexer_is_type_keyword(kw))
+          eina_strbuf_append(buf, eo_lexer_get_c_type(kw));
+        else
+          eina_strbuf_append(buf, tp->name);
      }
    else if (tp->type == EOLIAN_TYPE_VOID)
      eina_strbuf_append(buf, "void");

-- 


Reply via email to