diff options
author | Michael Chastain <mec.gnu@mindspring.com> | 2004-01-15 10:24:25 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2004-01-15 10:24:25 +0000 |
commit | 71e6838406deea6cd2609a40ab964da17a2c70e3 (patch) | |
tree | 3641ed014808e54c20525a5fc32c87ad66824ee4 | |
parent | ad5d827dc7bda0ead4557d5a10905613f1bf2e2b (diff) | |
download | gcc-71e6838406deea6cd2609a40ab964da17a2c70e3.zip gcc-71e6838406deea6cd2609a40ab964da17a2c70e3.tar.gz gcc-71e6838406deea6cd2609a40ab964da17a2c70e3.tar.bz2 |
class.c (gen_indirect_dispatch_tables): Fix string length calculations.
2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
* class.c (gen_indirect_dispatch_tables): Fix string length
calculations.
From-SVN: r75913
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/class.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 213f50e..a7c2855 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-01-15 Michael Chastain <mec.gnu@mindspring.com> + + * class.c (gen_indirect_dispatch_tables): Fix string length + calculations. + 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory. diff --git a/gcc/java/class.c b/gcc/java/class.c index bf9f79e..58cf778 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -313,7 +313,7 @@ gen_indirect_dispatch_tables (tree type) const char *typename = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); { tree field = NULL; - char *buf = alloca (strlen (typename) + strlen ("_catch_classes_")); + char *buf = alloca (strlen (typename) + strlen ("_catch_classes_") + 1); tree catch_class_type = make_node (RECORD_TYPE); sprintf (buf, "_catch_classes_%s", typename); @@ -335,7 +335,7 @@ gen_indirect_dispatch_tables (tree type) if (flag_indirect_dispatch) { { - char *buf = alloca (strlen (typename) + strlen ("_otable_syms_")); + char *buf = alloca (strlen (typename) + strlen ("_otable_syms_") + 1); sprintf (buf, "_otable_%s", typename); TYPE_OTABLE_DECL (type) = @@ -356,7 +356,7 @@ gen_indirect_dispatch_tables (tree type) } { - char *buf = alloca (strlen (typename) + strlen ("_atable_syms_")); + char *buf = alloca (strlen (typename) + strlen ("_atable_syms_") + 1); tree decl; sprintf (buf, "_atable_%s", typename); |