audioresample: reject 0 denominator when creating resampler
Coverity 1195140, 1195139, 1195138
This commit is contained in:
parent
3d1fdf8dd8
commit
f588d14cdc
@ -988,6 +988,11 @@ speex_resampler_init_frac (spx_uint32_t nb_channels, spx_uint32_t ratio_num,
|
|||||||
*err = RESAMPLER_ERR_INVALID_ARG;
|
*err = RESAMPLER_ERR_INVALID_ARG;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (ratio_den == 0) {
|
||||||
|
if (err)
|
||||||
|
*err = RESAMPLER_ERR_INVALID_ARG;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
switch (sinc_filter_mode) {
|
switch (sinc_filter_mode) {
|
||||||
case RESAMPLER_SINC_FILTER_INTERPOLATED:
|
case RESAMPLER_SINC_FILTER_INTERPOLATED:
|
||||||
use_full_sinc_table = 0;
|
use_full_sinc_table = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user