Commit 391267b1 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dbus: fix boundary test in SetVideoES, SetAudioES and SetSubtitleES

parent 14059298
......@@ -770,7 +770,7 @@ DBUS_METHOD( SetVideoES )
vlc_value_t newval;
var_Change( p_input, "video-es", VLC_VAR_GETCHOICES, &val_list, NULL );
if( (i_es < 0) && (i_es >= val_list.p_list->i_count) )
if( (i_es < 0) || (i_es >= val_list.p_list->i_count) )
i_es = -1;
else
{
......@@ -879,7 +879,7 @@ DBUS_METHOD( SetAudioES )
vlc_value_t newval;
var_Change( p_input, "audio-es", VLC_VAR_GETCHOICES, &val_list, NULL );
if( (i_es < 0) && (i_es >= val_list.p_list->i_count) )
if( (i_es < 0) || (i_es >= val_list.p_list->i_count) )
i_es = -1;
else
{
......@@ -992,7 +992,7 @@ DBUS_METHOD( SetSubtitleES )
if( val_list.p_list->i_count == 0 )
i_es = -1;
if( (i_es < 0) && (i_es >= val_list.p_list->i_count) )
if( (i_es < 0) || (i_es >= val_list.p_list->i_count) )
i_es = -1;
newval = val_list.p_list->p_values[i_es];
......
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