From 8f87134c125c9aeddc5b39f0f74bfd3a4d80a511 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Thu, 4 Feb 1999 18:37:01 +0000 Subject: [PATCH] Doh! * gdbtk-variable.c (variable_create): Allocate enough space to hold the NULL, too! --- gdb/ChangeLog-gdbtk | 5 +++++ gdb/gdbtk-variable.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index 69eb44f2dcc..68908ec5e5b 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,3 +1,8 @@ +Thu Feb 4 10:35:28 1999 Keith Seitz + + * gdbtk-variable.c (variable_create): Allocate enough + space to hold the NULL, too! + Wed Feb 3 13:37:07 1999 Keith Seitz * gdbtk-variable.c (variable_create): Add parentheses to the name diff --git a/gdb/gdbtk-variable.c b/gdb/gdbtk-variable.c index c7fc73acbe0..09ff3609b90 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); -- 2.30.2