[vlc-commits] dbus: Add memory allocation failure check

Mirsal Ennaime git at videolan.org
Wed Feb 6 15:17:34 CET 2013


vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Wed Feb  6 15:16:26 2013 +0100| [56180db3def98fd0c9e4b9c32e6941074e1db8c4] | committer: Mirsal Ennaime

dbus: Add memory allocation failure check

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=56180db3def98fd0c9e4b9c32e6941074e1db8c4
---

 modules/control/dbus/dbus_root.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c
index caa0cf3..358bc8a 100644
--- a/modules/control/dbus/dbus_root.c
+++ b/modules/control/dbus/dbus_root.c
@@ -481,6 +481,12 @@ PropertiesChangedSignal( intf_thread_t    *p_intf,
     i_properties = vlc_dictionary_keys_count( p_changed_properties );
     ppsz_properties = vlc_dictionary_all_keys( p_changed_properties );
 
+    if( unlikely(!ppsz_properties) )
+    {
+        dbus_message_iter_abandon_container( &args, &invalidated_properties );
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
     for( int i = 0; i < i_properties; i++ )
     {
         PROPERTY_MAPPING_BEGIN



More information about the vlc-commits mailing list