This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.12-183-ga129c80


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a129c80d54ec951567caa8c1b042275422d5f367 (commit)
      from  b76b818e6fe2061e778b3a9bbe63c554c3f9b3c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a129c80d54ec951567caa8c1b042275422d5f367

commit a129c80d54ec951567caa8c1b042275422d5f367
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Oct 11 11:46:22 2010 -0400

    Fix memory leak for some invalid regular expressions.

diff --git a/ChangeLog b/ChangeLog
index bc6cfa7..15b47f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-10-11  Ulrich Drepper  <drepper@gmail.com>
 
+	* posix/regcomp.c (parse_bracket_exp): Add missing re_free calls.
+
+	[BZ #12078]
+	* posix/regcomp.c (parse_sub_exp): Free tree data when it is not used.
+
 	[BZ #12108]
 	* stdio-common/psiginfo.c (psiginfo): Don't expext SIGRTMIN..SIGRTMAX
 	to have entries in sys_siglist.
diff --git a/NEWS b/NEWS
index fcb1b57..bd0f21c 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ Version 2.13
 * The following bugs are resolved with this release:
 
   3268, 7066, 10851, 11611, 11640, 11701, 11840, 11856, 11883, 11903, 11904,
-  11968, 11979, 12005, 12037, 12067, 12077, 12092, 12093, 12107, 12108
+  11968, 11979, 12005, 12037, 12067, 12077, 12078, 12092, 12093, 12107, 12108
 
 * New Linux interfaces: prlimit, prlimit64, fanotify_init, fanotify_mark
 
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 03ab123..9f5ca2c 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -2418,7 +2418,11 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
     {
       tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
       if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
-	*err = REG_EPAREN;
+	{
+	  if (tree != NULL)
+	    free_tree (NULL, tree);
+	  *err = REG_EPAREN;
+	}
       if (BE (*err != REG_NOERROR, 0))
 	return NULL;
     }
@@ -3028,6 +3032,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
   if (BE (sbcset == NULL, 0))
 #endif /* RE_ENABLE_I18N */
     {
+      re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+      re_free (mbcset);
+#endif
       *err = REG_ESPACE;
       return NULL;
     }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    5 +++++
 NEWS            |    2 +-
 posix/regcomp.c |   10 +++++++++-
 3 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]