projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01d8725
)
utils: catch invalid instance sizes in gst_type_register_static_full()
author
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Mon, 10 Oct 2011 18:41:33 +0000
(19:41 +0100)
committer
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Mon, 10 Oct 2011 18:41:33 +0000
(19:41 +0100)
Add guards to catch overly large instance sizes.
https://bugzilla.gnome.org/show_bug.cgi?id=660955
gst/gstutils.c
patch
|
blob
|
history
diff --git
a/gst/gstutils.c
b/gst/gstutils.c
index
7a0360a
..
d32bb5e
100644
(file)
--- a/
gst/gstutils.c
+++ b/
gst/gstutils.c
@@
-3900,6
+3900,9
@@
gst_type_register_static_full (GType parent_type,
{
GTypeInfo info;
+ g_return_val_if_fail (class_size <= G_MAXUINT16, G_TYPE_INVALID);
+ g_return_val_if_fail (instance_size <= G_MAXUINT16, G_TYPE_INVALID);
+
info.class_size = class_size;
info.base_init = base_init;
info.base_finalize = base_finalize;