aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-05-10 01:01:27 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-05-10 01:01:27 +0000
commitd5f9d0802ccf6c6431f93ac21433e4d97f72c9e6 (patch)
tree96fee190abf966aa0b919c148762e4338c48c661
parent4b077790466b7e7e7982b323fe30f3ea3c377c02 (diff)
downloadgcc-d5f9d0802ccf6c6431f93ac21433e4d97f72c9e6.zip
gcc-d5f9d0802ccf6c6431f93ac21433e4d97f72c9e6.tar.gz
gcc-d5f9d0802ccf6c6431f93ac21433e4d97f72c9e6.tar.bz2
re PR libfortran/31880 ([4.2 only] silent data corruption in gfortran read statement)
2007-05-09 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/31880 * io/unix.c (fd_alloc_r_at): Fix calculation of physical offset. From-SVN: r124588
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/io/unix.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 18118d8..acfaec5 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/31880
+ * io/unix.c (fd_alloc_r_at): Fix calculation of physical offset.
+
2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/31607
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index cdac0d7..38d4adf 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -492,7 +492,7 @@ fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
if (n < 0)
return NULL;
- s->physical_offset = where + n;
+ s->physical_offset = m + n;
s->active += n;
}
else
@@ -503,7 +503,7 @@ fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
if (do_read (s, s->buffer + s->active, &n) != 0)
return NULL;
- s->physical_offset = where + n;
+ s->physical_offset = m + n;
s->active += n;
}