q66 pushed a commit to branch master.

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

commit 4bdb1f73b8ec55d4d00a2ce6607d47f388150ed2
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Mon May 23 10:49:42 2016 +0100

    eolian: handle invalid keywords correctly
    
    Before this Eolian segfaulted when an invalid keyword was used.
    
    Fixes T3672.
---
 src/lib/eolian/eo_lexer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index dff540c..c38eb49 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -954,9 +954,9 @@ lex(Eo_Lexer *ls, Eo_Token *tok)
                 tok->kw = (int)(uintptr_t)eina_hash_find(keyword_map,
                                                         str);
                 ls->column = col + 1;
+                tok->value.s = eina_stringshare_add(str);
                 if (at_kw && tok->kw == 0)
                   eo_lexer_syntax_error(ls, "invalid keyword");
-                tok->value.s = eina_stringshare_add(str);
                 return TOK_VALUE;
              }
            else

-- 


Reply via email to