This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] libio: Fix fmemopen 'w' mode with provided buffer
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 16 Jul 2015 13:30:55 -0400
- Subject: Re: [PATCH] libio: Fix fmemopen 'w' mode with provided buffer
- Authentication-results: sourceware.org; auth=none
- References: <55A799A3 dot 6040202 at linaro dot org>
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.