re PR libfortran/23154 (Currupt string and segfault in formatted read.)

2005-08-08  Jerry DeLisle  <jvdelisle@verizon.net>

        PR libfortran/23154
        * io/transfer.c (data_transfer_init): Initialize
        current_unit->bytes_left for a read.

From-SVN: r102893
This commit is contained in:
Jerry DeLisle 2005-08-09 01:56:04 +00:00 committed by Jerry DeLisle
parent 7c2d3f19a1
commit 3d092c45bf
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-08-08 Jerry DeLisle <jvdelisle@verizon.net>
PR libfortran/23154
* io/transfer.c (data_transfer_init): Initialize
current_unit->bytes_left for a read.
2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR fortran/22390

View File

@ -1028,7 +1028,9 @@ data_transfer_init (int read_flag)
{
current_unit->recl = file_length(current_unit->s);
if (g.mode==WRITING)
empty_internal_buffer (current_unit->s);
empty_internal_buffer (current_unit->s);
else
current_unit->bytes_left = current_unit->recl;
}
/* Check the action. */