ao_pulse: check for sample rate bounds

pa_format_info_valid() does not do this. (Although there is a proposed
patch on the PulseAudio mailing list.)

See #2654.
This commit is contained in:
wm4 2016-01-05 19:37:08 +01:00
parent 8fda7247ff
commit 861c126b08
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ static bool set_format(struct ao *ao, pa_format_info *format)
pa_format_info_set_channels(format, ao->channels.num);
pa_format_info_set_channel_map(format, &map);
return pa_format_info_valid(format);
return ao->samplerate < PA_RATE_MAX && pa_format_info_valid(format);
}
static int init(struct ao *ao)