[PATCH] Fix access beyond array after write error in file I/O

Siddhesh Poyarekar siddhesh@redhat.com
Fri Apr 19 08:55:00 GMT 2013


On Thu, Apr 18, 2013 at 03:19:59PM +0200, Andreas Schwab wrote:
> From <https://bugzilla.novell.com/show_bug.cgi?id=813306>.
> fileops.c:new_do_write is supposed to return 0 on error.
> 
> Andreas.
> 
> 	* libio/fileops.c (new_do_write): Return zero if there was a write
> 	error.
> 	(_IO_new_file_xsputn): Return EOF if nothing was written.

This seems to be a regression due to my apparently incorrect fixes to
pr#11741.  Eric Biggers has attempted a patch to fix this by reverting
that patch and fixing pr#11741 correctly:

http://sourceware.org/ml/libc-alpha/2013-04/msg00498.html

Siddhesh



More information about the Libc-alpha mailing list