svn commit: r187810 - in stable/7/lib/libc: . stdio string

David Schultz das at FreeBSD.org
Tue Jan 27 21:07:18 PST 2009


Author: das
Date: Wed Jan 28 05:07:16 2009
New Revision: 187810
URL: http://svn.freebsd.org/changeset/base/187810

Log:
  MFC r186887:
  
    Set the error indicator on an attempt to write to a read-only stream.
  
    PR:		127335

Modified:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdio/wsetup.c
  stable/7/lib/libc/string/ffsll.c   (props changed)
  stable/7/lib/libc/string/flsll.c   (props changed)

Modified: stable/7/lib/libc/stdio/wsetup.c
==============================================================================
--- stable/7/lib/libc/stdio/wsetup.c	Wed Jan 28 04:37:27 2009	(r187809)
+++ stable/7/lib/libc/stdio/wsetup.c	Wed Jan 28 05:07:16 2009	(r187810)
@@ -60,6 +60,7 @@ __swsetup(fp)
 	if ((fp->_flags & __SWR) == 0) {
 		if ((fp->_flags & __SRW) == 0) {
 			errno = EBADF;
+			fp->_flags |= __SERR;
 			return (EOF);
 		}
 		if (fp->_flags & __SRD) {


More information about the svn-src-stable mailing list