hermet pushed a commit to branch enventor-0.3.

http://git.enlightenment.org/tools/enventor.git/commit/?id=310e5feb890eacd9e14612872d593ea8637fe56e

commit 310e5feb890eacd9e14612872d593ea8637fe56e
Author: Mykyta Biliavskyi <[email protected]>
Date:   Thu Aug 7 15:25:26 2014 +0900

    edc_editor: fix segfault on last character undo.
    
    Summary:
    In case when undone character(s) in entry, was call updating syntax 
highlight. If entry is empty, then pointer of text  didn't cleared and it was 
cause segfault in evas_textblock module.
    @fix Fixes T1480
    
    Reviewers: Hermet
    
    Subscribers: kfesyna
    
    Projects: #enventor
    
    Maniphest Tasks: T1480
    
    Differential Revision: https://phab.enlightenment.org/D1272
    
    Conflicts:
    
        src/bin/edc_editor.c
---
 src/bin/edc_editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/edc_editor.c b/src/bin/edc_editor.c
index a5404dc..8a3cad1 100644
--- a/src/bin/edc_editor.c
+++ b/src/bin/edc_editor.c
@@ -204,7 +204,7 @@ syntax_color_full_update(edit_data *ed, Eina_Bool thread)
 
    if (thread)
      {
-        syntax_color_td *td = malloc(sizeof(syntax_color_td));
+        syntax_color_td *td = calloc(1, sizeof(syntax_color_td));
         td->ed = ed;
         Evas_Object *tb = elm_entry_textblock_get(ed->en_edit);
         td->text = (char *) evas_object_textblock_text_markup_get(tb);

-- 


Reply via email to