[glib] gregex: Fix an assignment-after-free error



commit 2c35acff7b65bd7b794e72c43e3056d113686307
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Jan 11 17:15:55 2017 +0000

    gregex: Fix an assignment-after-free error
    
    The match_info is freed just above this line, so this would result in a
    write to freed memory.
    
    Spotted by Leslie Zhai <xiangzhai83 gmail com>.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777077

 glib/gregex.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/glib/gregex.c b/glib/gregex.c
index 76a5104..a9f6814 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -2294,7 +2294,6 @@ g_regex_split_full (const GRegex      *regex,
     {
       g_propagate_error (error, tmp_error);
       g_list_free_full (list, g_free);
-      match_info->pos = -1;
       return NULL;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]