GNU C Library master sources branch, master, updated. glibc-2.13-48-g042c49c6

drepper@sourceware.org drepper@sourceware.org
Fri Mar 18 09:30:00 GMT 2011


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  042c49c681ca671215849a3788595b7eba90ffd0 (commit)
       via  8126d90480fa3e0c5c5cd0d02cb1c93174b45485 (commit)
      from  ccfe366e6fc64bb81183480bd2ae113041d3c84c (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=042c49c681ca671215849a3788595b7eba90ffd0

commit 042c49c681ca671215849a3788595b7eba90ffd0
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Mar 18 05:30:17 2011 -0400

    Add BZ info.

diff --git a/ChangeLog b/ChangeLog
index e392d67..738c209 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2011-03-18  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #12583]
 	* posix/fnmatch.c (fnmatch): Check size of pattern in wide
 	character representation.
 	Partly based on a patch by Tomas Hoger <thoger@redhat.com>.
diff --git a/NEWS b/NEWS
index 3b02f3b..7ca9123 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-3-10
+GNU C Library NEWS -- history of user-visible changes.  2011-3-18
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -9,7 +9,7 @@ Version 2.14
 
 * The following bugs are resolved with this release:
 
-  11724, 12445, 12454, 12460, 12469, 12489, 12509, 12510
+  11724, 12445, 12454, 12460, 12469, 12489, 12509, 12510, 12583
 
 Version 2.13
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8126d90480fa3e0c5c5cd0d02cb1c93174b45485

commit 8126d90480fa3e0c5c5cd0d02cb1c93174b45485
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Mar 18 05:29:20 2011 -0400

    Check size of pattern in wide character representation in fnmatch.

diff --git a/ChangeLog b/ChangeLog
index 0840189..e392d67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-18  Ulrich Drepper  <drepper@gmail.com>
+
+	* posix/fnmatch.c (fnmatch): Check size of pattern in wide
+	character representation.
+	Partly based on a patch by Tomas Hoger <thoger@redhat.com>.
+
 2011-03-16  Ryan S. Arnold  <rsa@us.ibm.com>
 
 	* sysdeps/powerpc/powerpc32/power6/fpu/s_isnanf.S (isnanf): Fix
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index 0af5ee6..819a6a7 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007,2010
+/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2007,2010,2011
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -375,6 +375,11 @@ fnmatch (pattern, string, flags)
 	       XXX Do we have to set `errno' to something which mbsrtows hasn't
 	       already done?  */
 	    return -1;
+	  if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
+	    {
+	      __set_errno (ENOMEM);
+	      return -2;
+	    }
 	  wpattern_malloc = wpattern
 	    = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
 	  assert (mbsinit (&ps));
@@ -419,6 +424,12 @@ fnmatch (pattern, string, flags)
 	       XXX Do we have to set `errno' to something which mbsrtows hasn't
 	       already done?  */
 	    goto free_return;
+	  if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
+	    {
+	      free (wpattern_malloc);
+	      __set_errno (ENOMEM);
+	      return -2;
+	    }
 
 	  wstring_malloc = wstring
 	    = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));

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

Summary of changes:
 ChangeLog       |    7 +++++++
 NEWS            |    4 ++--
 posix/fnmatch.c |   13 ++++++++++++-
 3 files changed, 21 insertions(+), 3 deletions(-)


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



More information about the Glibc-cvs mailing list