This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Trivial fix: sscanf always calls realloc
- From: Ulrich Drepper <drepper at gmail dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 8 Jan 2012 20:14:37 -0500
- Subject: Re: [PATCH] Trivial fix: sscanf always calls realloc
- References: <20120106010548.36506190B06@elbrus2.mtv.corp.google.com>
On Thu, Jan 5, 2012 at 20:05, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
> index 0e71deb..c96367e3 100644
> --- a/stdio-common/vfscanf.c
> +++ b/stdio-common/vfscanf.c
> @@ -274,7 +274,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
> Â Â Â Â ÂCHAR_T *old = wp; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
>     Âsize_t newsize = (UCHAR_MAX + 1 > 2 * wpmax            \
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â? UCHAR_MAX + 1 : 2 * wpmax); Â Â Â Â Â Â Â Â Â \
> - Â Â Â Â if (use_malloc || __libc_use_alloca (newsize)) Â Â Â Â Â Â Â Â Â Â\
> + Â Â Â Â if (use_malloc || !__libc_use_alloca (newsize)) Â Â Â Â Â Â Â Â Â \
Applied. Next time update the copyright year as well. Just use
emacs's copyright mode!