diff options
author | Jerry DeLisle <jvdelisle@verizon.net> | 2005-08-09 01:56:04 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2005-08-09 01:56:04 +0000 |
commit | 3d092c45bf57b3f9df0892e8d95a6284106a86c2 (patch) | |
tree | 47d09903090f3f89512492bca0f86267ce775132 | |
parent | 7c2d3f19a1a8ef20b24ce125dc7b553f3a7cb96c (diff) | |
download | gcc-3d092c45bf57b3f9df0892e8d95a6284106a86c2.zip gcc-3d092c45bf57b3f9df0892e8d95a6284106a86c2.tar.gz gcc-3d092c45bf57b3f9df0892e8d95a6284106a86c2.tar.bz2 |
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
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index aed0280..d733fa3 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -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 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 72cc2b9..00e8c31 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -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. */ |