aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-08-03 02:02:03 +0000
committerJohn Gilmore <gnu@cygnus>1991-08-03 02:02:03 +0000
commit4f6f12f989cf28d793de33fc8f6bdc1864752bd6 (patch)
tree48aa65977e6b9280da0e51d942c5eb731a6fa3da /gdb/values.c
parentc5c604c4467d2b786a97de4d212af59e67e146e2 (diff)
downloadgdb-4f6f12f989cf28d793de33fc8f6bdc1864752bd6.zip
gdb-4f6f12f989cf28d793de33fc8f6bdc1864752bd6.tar.gz
gdb-4f6f12f989cf28d793de33fc8f6bdc1864752bd6.tar.bz2
Only read the right number of bytes in reading basetypes, so we don't
overrun malloc.
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 1c11d4e..34c64b3 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1179,7 +1179,7 @@ baseclass_addr (type, index, valaddr, valuep, errp)
status = target_read_memory (addr,
VALUE_CONTENTS_RAW (val),
- TYPE_LENGTH (type));
+ TYPE_LENGTH (basetype));
VALUE_LVAL (val) = lval_memory;
VALUE_ADDRESS (val) = addr;