Divide by zero in RIFF::WAV::Properties::read

Wolfgang Plaschg wolfgang.plaschg at gmail.com
Sun Sep 18 23:34:07 UTC 2011

If I see correctly, it should be

d->sampleFrames = (d->streamLength / (d->channels * d->sampleWidth)) * 8;


Am 18.09.2011 14:22, schrieb James Burton:
> Hello all,
> There is a divide-by-zero crash in RIFF::WAV::Properties::read() if the sample width in the file is less than 8. I've attached an example file and there are also real files available at https://secure.wikimedia.org/wikipedia/en/wiki/Wave_file that have samples smaller than 8 bits.
> Fix is here: https://github.com/jburton/taglib/commit/f663b2598a71279e8867c8648a4c5d1ef4dca09e
> Thanks,
> James Burton

More information about the taglib-devel mailing list