diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2008-10-23 22:48:40 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2008-10-23 22:48:40 +0000 |
commit | 3c0ed2996e2f868939b67b8b83785c5d5c114474 (patch) | |
tree | ccc758d1104e2df557e90473993736da8c11d993 /gdb/python | |
parent | 103fd00dc6f8d285b63a5945f404d3b5221689bc (diff) | |
download | fsf-binutils-gdb-3c0ed2996e2f868939b67b8b83785c5d5c114474.zip fsf-binutils-gdb-3c0ed2996e2f868939b67b8b83785c5d5c114474.tar.gz fsf-binutils-gdb-3c0ed2996e2f868939b67b8b83785c5d5c114474.tar.bz2 |
2008-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/python-value (valpy_getitem): Fix heap corruption.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/python-value.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c index 75ae625..d957273 100644 --- a/gdb/python/python-value.c +++ b/gdb/python/python-value.c @@ -161,7 +161,8 @@ valpy_getitem (PyObject *self, PyObject *key) TRY_CATCH (except, RETURN_MASK_ALL) { - res_val = value_struct_elt (&self_value->value, NULL, field, 0, NULL); + struct value *tmp = self_value->value; + res_val = value_struct_elt (&tmp, NULL, field, 0, NULL); } GDB_PY_HANDLE_EXCEPTION (except); |