summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-09-06 20:45:36 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-09-06 20:45:36 (GMT)
commit9aaaa651d924eb30e46f26690aea007b7d868e35 (patch)
tree846d8f5d27bc7c289a6b0241f1ad3fbe2510f1c6 /plugins/pychrysalide/format
parent9dac560b09bfea058e0286b1a5cd25c37290af39 (diff)
Fixed possible UAFs when adding symbols.
Diffstat (limited to 'plugins/pychrysalide/format')
-rw-r--r--plugins/pychrysalide/format/format.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/pychrysalide/format/format.c b/plugins/pychrysalide/format/format.c
index bf6c3f1..af881af 100644
--- a/plugins/pychrysalide/format/format.c
+++ b/plugins/pychrysalide/format/format.c
@@ -130,6 +130,7 @@ static PyObject *py_binary_format_add_symbol(PyObject *self, PyObject *args)
format = G_BIN_FORMAT(pygobject_get(self));
symbol = G_BIN_SYMBOL(pygobject_get(symbol_obj));
+ g_object_ref(G_OBJECT(symbol));
added = g_binary_format_add_symbol(format, symbol);
result = added ? Py_True : Py_False;