diff options
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 62ecbb0..d559c11 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1573,7 +1573,7 @@ yylex () struct symbol *cur_sym; /* As big as the whole rest of the expression, which is at least big enough. */ - char *tmp = alloca (strlen (namestart)); + char *tmp = alloca (strlen (namestart)+1); memcpy (tmp, namestart, p - namestart); tmp[p - namestart] = '\0'; |