[PATCH] libio: Fix fmemopen 'w' mode with provided buffer
Carlos O'Donell
carlos@redhat.com
Thu Jul 16 17:30:00 GMT 2015
On 07/16/2015 07:46 AM, Adhemerval Zanella wrote:
> If 'w' mode is used with a provided buffer the fmemopen will try to find
> the first null byte to set as maximum internal stream size. It should be
> done only for append mode ('a').
>
> Kudos for Stefan Liebler for finding this error on s390-32.
>
> --
>
> * libio/fmemopen.c (__fmemopen): Fix 'w' openmode with provided
> buffer.
> * stdio-common/tst-fmemopen2.c (do_test_with_buffer): Typo.
OK for 2.22
c.
More information about the Libc-alpha
mailing list