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.14-112-ge0e7228


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  e0e722848005e335132015a64a09cad7f7a12073 (commit)
      from  feb1eb0be78b40d53c71474f07d1b0517ba95586 (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=e0e722848005e335132015a64a09cad7f7a12073

commit e0e722848005e335132015a64a09cad7f7a12073
Author: Andreas Schwab <schwab@redhat.com>
Date:   Tue Jul 19 15:03:57 2011 -0400

    Fix alloca accounting in strxfm

diff --git a/ChangeLog b/ChangeLog
index b6cc5ca..2a57fc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-19  Andreas Schwab  <schwab@redhat.com>
+
+	* string/strxfrm_l.c (STRXFRM): Fix alloca accounting.
+
 2011-07-19  Ulrich Drepper  <drepper@gmail.com>
 
 	* nscd/nscd.c (termination_handler): Don't do anything for a database
diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
index 351b426..220253c 100644
--- a/string/strxfrm_l.c
+++ b/string/strxfrm_l.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995-1997,2002,2004-2006,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997,2002,2004-2006,2010,2011
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -150,7 +151,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
      values.  But since there is no limit on the length of the string
      we have to use `malloc' if the string is too long.  We should be
      very conservative here.  */
-  if (! __libc_use_alloca (srclen))
+  if (! __libc_use_alloca ((srclen + 1) * (sizeof (int32_t) + 1)))
     {
       idxarr = (int32_t *) malloc ((srclen + 1) * (sizeof (int32_t) + 1));
       rulearr = (unsigned char *) &idxarr[srclen];

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

Summary of changes:
 ChangeLog          |    4 ++++
 string/strxfrm_l.c |    5 +++--
 2 files changed, 7 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]