about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-05 18:20:47 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-05 18:20:47 +0000
commit6eead9b470f12de97402d3c59a76b0ffb85c5f5b (patch)
treed4e0dac317ec139ae79b1bf9405266cf8b34a5a0
parentb85f2e879f222f6fdb1c189bc061a9e1b94dc39a (diff)
downloadglibc-6eead9b470f12de97402d3c59a76b0ffb85c5f5b.tar.gz
glibc-6eead9b470f12de97402d3c59a76b0ffb85c5f5b.tar.xz
glibc-6eead9b470f12de97402d3c59a76b0ffb85c5f5b.zip
Update.
1999-08-05  Ulrich Drepper  <drepper@cygnus.com>

	* libio/genops.c (_IO_flush_all): Don't access elements beyond what
	2.0 defined if they are not available.
-rw-r--r--ChangeLog5
-rw-r--r--libio/genops.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bd3d6a8fe8..cc18f0dedb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-08-05  Ulrich Drepper  <drepper@cygnus.com>
+
+	* libio/genops.c (_IO_flush_all): Don't access elements beyond what
+	2.0 defined if they are not available.
+
 1999-08-05  Thorsten Kukuk  <kukuk@suse.de>
 
 	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_RSYNC, O_DSYNC):
diff --git a/libio/genops.c b/libio/genops.c
index a8f34463ad..07dc4e81dd 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -742,8 +742,9 @@ _IO_flush_all ()
   _IO_FILE *fp;
   for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
     if (((fp->_mode < 0 && fp->_IO_write_ptr > fp->_IO_write_base)
-	 || (fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr
-			       > fp->_wide_data->_IO_write_base)))
+	 || (fp->_vtable_offset == 0
+	     && fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr
+				  > fp->_wide_data->_IO_write_base)))
 	&& _IO_OVERFLOW (fp, EOF) == EOF)
       result = EOF;
   return result;