class.c (make_local_function_alias): Allocate extra space for 'L' in name buffer.
authorBryce McKinlay <mckinlay@redhat.com>
Thu, 19 Aug 2004 14:32:31 +0000 (14:32 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Thu, 19 Aug 2004 14:32:31 +0000 (15:32 +0100)
2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>

* class.c (make_local_function_alias): Allocate extra space for 'L'
in name buffer. Reported by Thomas Neumann.

From-SVN: r86251

gcc/java/ChangeLog
gcc/java/class.c

index 4489f6a..b16f9f3 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
+
+       * class.c (make_local_function_alias): Allocate extra space for 'L'
+       in name buffer. Reported by Thomas Neumann.
+
 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
 
        * parse.h (JAVA_RADIX10_FLAG): Rename to ...
index d24e033..4781a61 100644 (file)
@@ -1210,7 +1210,7 @@ make_local_function_alias (tree method)
 #ifdef ASM_OUTPUT_DEF
   tree alias;
   const char *method_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method));
-  char *name = alloca (strlen (method_name) + 1);
+  char *name = alloca (strlen (method_name) + 2);
   char *buf = alloca (strlen (method_name) + 128);
   
   /* Prefix method_name with 'L' for the alias label.  */