diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 65be7e725c6deb699032c221ad60c9636bf69c35..c9fdb6bc30cb0f026e5d257513b71627374da2a7 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+	PR libgfortran/25550
+	* io/file_pos.c (st_rewind): Reset bytes left so no error occurs in
+	next_record_r.
+
 2005-12-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
 	PR libgfortran/25419
diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c
index 3d7dd9ab8b6ca8e4a9b1402cfdaabc01377495a0..d9ac1e7f7edaaaae736f7e6af1342909296c32c2 100644
--- a/libgfortran/io/file_pos.c
+++ b/libgfortran/io/file_pos.c
@@ -255,6 +255,7 @@ st_rewind (st_parameter_filepos *fpp)
 
 	  u->endfile = NO_ENDFILE;
 	  u->current_record = 0;
+	  u->bytes_left = 0;
 	  test_endfile (u);
 	}
       /* Update position for INQUIRE.  */