diff options
| -rw-r--r-- | gcc/misc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/misc.cc b/gcc/misc.cc index 33604c7..417b44d 100644 --- a/gcc/misc.cc +++ b/gcc/misc.cc @@ -40,7 +40,7 @@ get_fresh_function_name () pretty_printer pp; dump_generic_node (&pp, cfun->decl, 0, TDF_VOPS|TDF_MEMSYMS, false); const char *str = pp_formatted_text (&pp); - result = new char[strlen (str)]; + result = new char[strlen (str) + 1]; return strcpy (result, str); } result = new char[sizeof("UNKNOWN") + 1]; |
