Skip to content
Commit 787813b1 authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

libio: Fix fmemopen 'w' mode with provided buffer

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): Fix typo and
	fail output information.
parent b42f8cad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment