From 530851afcfc0f47c6e481dfbd16849ef19f76e1d Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 28 Apr 2006 13:51:00 +0000 Subject: [PATCH] gst/gstvalue.c: Avoid NULL dereference when trying to serialize flags containing invalid values. Original commit message from CVS: * gst/gstvalue.c: (gst_value_serialize_flags): Avoid NULL dereference when trying to serialize flags containing invalid values. --- ChangeLog | 6 ++++++ gst/gstvalue.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fe0a9d771..b926208296 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-28 Michael Smith + + * gst/gstvalue.c: (gst_value_serialize_flags): + Avoid NULL dereference when trying to serialize flags containing + invalid values. + 2006-04-28 Michael Smith * plugins/elements/gsttypefindelement.c: diff --git a/gst/gstvalue.c b/gst/gstvalue.c index aff241b9e6..0565c63043 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -1928,9 +1928,10 @@ gst_value_serialize_flags (const GValue * value) g_free (result); result = tmp; first = FALSE; + + /* clear flag */ + flags &= ~fl->value; } - /* clear flag */ - flags &= ~fl->value; } g_type_class_unref (klass);