bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext-0.16.1: file vasprintf.c is wrong on amd64 bit


From: Andreas Schwab
Subject: Re: gettext-0.16.1: file vasprintf.c is wrong on amd64 bit
Date: Tue, 25 Sep 2007 01:45:00 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

> *** lib/vasprintf.c   13 May 2007 23:06:17 -0000      1.3
> --- lib/vasprintf.c   24 Sep 2007 23:02:46 -0000
> ***************
> *** 38,45 ****
>     /* Add one to make sure that it is never zero, which might cause malloc
>        to return NULL.  */
>     size_t total_width = strlen (format) + 1;
> !   va_list ap = *args;
>   
>     while (*p != '\0')
>       {
>         if (*p++ == '%')
> --- 38,46 ----
>     /* Add one to make sure that it is never zero, which might cause malloc
>        to return NULL.  */
>     size_t total_width = strlen (format) + 1;
> !   va_list ap;
>   
> +   va_copy (ap, *args);

If you call va_copy, you must also call va_end (also missing from
checkit).

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]