diff options
author | Keith Seitz <keiths@cygnus> | 1999-02-04 18:37:01 +0000 |
---|---|---|
committer | Keith Seitz <keiths@cygnus> | 1999-02-04 18:37:01 +0000 |
commit | 8f87134c125c9aeddc5b39f0f74bfd3a4d80a511 (patch) | |
tree | 4d0ca6e83611ae1ea7612934e2830ff3cac74412 /gdb/gdbtk-variable.c | |
parent | c498fa7287fa7e20243a7f61a61b88f98df61168 (diff) | |
download | binutils-8f87134c125c9aeddc5b39f0f74bfd3a4d80a511.zip binutils-8f87134c125c9aeddc5b39f0f74bfd3a4d80a511.tar.gz binutils-8f87134c125c9aeddc5b39f0f74bfd3a4d80a511.tar.bz2 |
Doh!
* gdbtk-variable.c (variable_create): Allocate enough
space to hold the NULL, too!
Diffstat (limited to 'gdb/gdbtk-variable.c')
-rw-r--r-- | gdb/gdbtk-variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbtk-variable.c b/gdb/gdbtk-variable.c index c7fc73a..09ff360 100644 --- a/gdb/gdbtk-variable.c +++ b/gdb/gdbtk-variable.c @@ -502,7 +502,7 @@ variable_create (interp, objc, objv) { /* Add parentheses to the name so that casts do not confuse it. */ - char *newname = (char *) xmalloc (strlen (name) + 2); + char *newname = (char *) xmalloc (strlen (name) + 3); sprintf (newname, "(%s)", name); var = create_variable (name, newname, pc); FREEIF (newname); |