diff options
author | Hanno Boeck <hanno@hboeck.de> | 2016-02-27 11:16:00 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-02-27 13:52:07 +0200 |
commit | 58c324e0ccc21498a7e29d82dc00ed008050d26c (patch) | |
tree | b8177e1dd8fad3f6440b743466694755c0724ccf | |
parent | b2077dcfab80f837fc3c4ee7c098cf66659cc698 (diff) |
NULL-terminate PyMethodDef array
PyMethodDef arrays are supposed to end with an entry full of NULL/0 values.
This is missing in gst-python in the file gstmodule.c.
This causes out of bounds memory reads which can be seen / tested by compiling
gst-python with address sanitizer (-fsanitize=address in CFLAGS/LDFLAGS).
https://bugzilla.gnome.org/show_bug.cgi?id=762766
-rw-r--r-- | gi/overrides/gstmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gi/overrides/gstmodule.c b/gi/overrides/gstmodule.c index e426165..79311a3 100644 --- a/gi/overrides/gstmodule.c +++ b/gi/overrides/gstmodule.c @@ -368,7 +368,8 @@ static PyMethodDef _gi_gst_functions[] = { {"fixme", (PyCFunction) _wrap_gst_fixme, METH_VARARGS, NULL}, {"memdump", (PyCFunction) _wrap_gst_memdump, METH_VARARGS, - NULL} + NULL}, + {NULL, NULL, 0, NULL} }; PYGLIB_MODULE_START (_gi_gst, "_gi_gst") |