From 3c0ed2996e2f868939b67b8b83785c5d5c114474 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Thu, 23 Oct 2008 22:48:40 +0000 Subject: 2008-10-23 Paul Pluzhnikov * python/python-value (valpy_getitem): Fix heap corruption. --- gdb/python/python-value.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/python') 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); -- cgit v1.1