1 Description: Avoid malformed wav causing floating point exception (integer divide by zero)
2 Author: Fabian Greffrath <fabian+debian@greffrath.com>
3 Bug-Debian: https://bugs.debian.org/777159
5 --- a/frontend/get_audio.c
6 +++ b/frontend/get_audio.c
7 @@ -1448,6 +1448,10 @@ parse_wave_header(lame_global_flags * gf
9 (void) lame_set_in_samplerate(gfp, global_reader.input_samplerate);
11 + /* avoid division by zero */
12 + if (bits_per_sample < 1)
15 global. pcmbitwidth = bits_per_sample;
16 global. pcm_is_unsigned_8bit = 1;
17 global. pcm_is_ieee_float = (format_tag == WAVE_FORMAT_IEEE_FLOAT ? 1 : 0);