This is the mail archive of the libc-alpha@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]

Re: [PATCH] Trivial fix: sscanf always calls realloc


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!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]