[vlc-commits] dbus: Add another memory allocation failure check
Mirsal Ennaime
git at videolan.org
Thu Feb 7 04:10:17 CET 2013
vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Thu Feb 7 03:54:11 2013 +0100| [b1bb9b54365a42e8d1b801378b51aa38789fbd84] | committer: Mirsal Ennaime
dbus: Add another memory allocation failure check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1bb9b54365a42e8d1b801378b51aa38789fbd84
---
modules/control/dbus/dbus_player.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index 7ec4e9d..010cd3b 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -855,6 +855,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