GNU C Library master sources branch, master, updated. glibc-2.12-244-g2543fef

drepper@sourceware.org drepper@sourceware.org
Mon Dec 27 23:20:00 GMT 2010


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  2543fef229599e8a6e4feeea65ca2dd3f984154f (commit)
      from  db014c12695388b4e6eb608a4132a8c7b4ee74f1 (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=2543fef229599e8a6e4feeea65ca2dd3f984154f

commit 2543fef229599e8a6e4feeea65ca2dd3f984154f
Author: Jim Meyering <meyering@redhat.com>
Date:   Mon Dec 27 18:19:56 2010 -0500

    Fix infloop on persistent failing calloc in regex.

diff --git a/ChangeLog b/ChangeLog
index e86929e..31b8a73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-27  Jim Meyering  <meyering@redhat.com>
+
+	[BZ #12348]
+	* posix/regexec.c (build_trtable): Return failure indication upon
+	calloc failure.  Otherwise, re_search_internal could infloop on OOM.
+
 2010-12-25  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12201]
diff --git a/NEWS b/NEWS
index 5070596..3edaf54 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2010-12-26
+GNU C Library NEWS -- history of user-visible changes.  2010-12-27
 Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -12,7 +12,7 @@ Version 2.13
   3268, 7066, 10085, 10851, 11149, 11611, 11640, 11655, 11701, 11840, 11856,
   11883, 11903, 11904, 11968, 11979, 12005, 12037, 12067, 12077, 12078, 12092,
   12093, 12107, 12108, 12113, 12140, 12159, 12167, 12191, 12194, 12201, 12204,
-  12205, 12207
+  12205, 12207, 12348
 
 * New Linux interfaces: prlimit, prlimit64, fanotify_init, fanotify_mark
 
diff --git a/posix/regexec.c b/posix/regexec.c
index 7f7ae31..8d4475c 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -3373,6 +3373,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
 	{
 	  state->trtable = (re_dfastate_t **)
 	    calloc (sizeof (re_dfastate_t *), SBC_MAX);
+	  if (BE (state->trtable == NULL, 0))
+	    return 0;
 	  return 1;
 	}
       return 0;

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

Summary of changes:
 ChangeLog       |    6 ++++++
 NEWS            |    4 ++--
 posix/regexec.c |    2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)


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



More information about the Glibc-cvs mailing list