Commit 26985f82 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dbus: Don't allow SetSubtitleES to access val_list.p_list->p_values[i_es] with i_es = -1

parent d66e529d
...@@ -991,17 +991,16 @@ DBUS_METHOD( SetSubtitleES ) ...@@ -991,17 +991,16 @@ DBUS_METHOD( SetSubtitleES )
int i_ret = -1; int i_ret = -1;
var_Change( p_input, "spu-es", VLC_VAR_GETCHOICES, &val_list, NULL ); var_Change( p_input, "spu-es", VLC_VAR_GETCHOICES, &val_list, NULL );
if( val_list.p_list->i_count == 0 ) if( (i_es < 0) || (i_es >= val_list.p_list->i_count) ||
(val_list.p_list->i_count == 0) )
i_es = -1; i_es = -1;
else
if( (i_es < 0) || (i_es >= val_list.p_list->i_count) ) {
i_es = -1; newval = val_list.p_list->p_values[i_es];
i_ret = var_Set( p_input, "spu-es", newval );
newval = val_list.p_list->p_values[i_es]; if( i_ret < 0 )
i_ret = var_Set( p_input, "spu-es", newval ); i_es = -1;
if( i_ret < 0 ) }
i_es = -1;
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
pl_Release( (vlc_object_t*) p_this ); pl_Release( (vlc_object_t*) p_this );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment