public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix alloca accounting in strxfm
@ 2011-07-19 12:27 Andreas Schwab
  2011-07-19 19:05 ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2011-07-19 12:27 UTC (permalink / raw)
  To: libc-hacker

2011-07-19  Andreas Schwab  <schwab@redhat.com>

	* string/strxfrm_l.c (STRXFRM): Fix alloca accounting.
---
 string/strxfrm_l.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
index 351b426..3448f1a 100644
--- a/string/strxfrm_l.c
+++ b/string/strxfrm_l.c
@@ -1,4 +1,4 @@
-/* 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 +150,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];
-- 
1.7.6


-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix alloca accounting in strxfm
  2011-07-19 12:27 [PATCH] Fix alloca accounting in strxfm Andreas Schwab
@ 2011-07-19 19:05 ` Ulrich Drepper
  2011-07-20  7:31   ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Drepper @ 2011-07-19 19:05 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-hacker

On Tue, Jul 19, 2011 at 08:27, Andreas Schwab <schwab@redhat.com> wrote:
> 2011-07-19  Andreas Schwab  <schwab@redhat.com>
>
>        * string/strxfrm_l.c (STRXFRM): Fix alloca accounting.

You didn't update the copyright year.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix alloca accounting in strxfm
  2011-07-19 19:05 ` Ulrich Drepper
@ 2011-07-20  7:31   ` Andreas Schwab
  2011-07-20 15:39     ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2011-07-20  7:31 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: libc-hacker

Ulrich Drepper <drepper@gmail.com> writes:

> You didn't update the copyright year.

What is the purpose of this stupid remark???

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix alloca accounting in strxfm
  2011-07-20  7:31   ` Andreas Schwab
@ 2011-07-20 15:39     ` Ulrich Drepper
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2011-07-20 15:39 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-hacker

On Wed, Jul 20, 2011 at 03:30, Andreas Schwab <schwab@redhat.com> wrote:
> What is the purpose of this stupid remark???

Just what it says: you didn't update the year in the copyright
comment.  That's required.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-20 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19 12:27 [PATCH] Fix alloca accounting in strxfm Andreas Schwab
2011-07-19 19:05 ` Ulrich Drepper
2011-07-20  7:31   ` Andreas Schwab
2011-07-20 15:39     ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).