aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-io.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d621950..ae69322 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-28 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR fortran/25587
+ * trans-io.c (gfc_build_st_parameter): Correct off by one error.
+
2005-12-28 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
* Make-lang.in: Remove distdir from comment.
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index ed6cf9a..24b7bc9 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -160,7 +160,7 @@ gfc_build_st_parameter (enum ioparam_type ptype, tree *types)
gcc_assert (len <= sizeof (name) - sizeof ("__st_parameter_"));
memcpy (name, "__st_parameter_", sizeof ("__st_parameter_"));
memcpy (name + sizeof ("__st_parameter_") - 1, st_parameter[ptype].name,
- len);
+ len + 1);
TYPE_NAME (t) = get_identifier (name);
for (type = 0, p = st_parameter_field; type < IOPARM_field_num; type++, p++)