Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some non-PCM wave files can cause SIG_ARITHMETIC #14

Merged
merged 1 commit into from Jul 28, 2011
Merged

Some non-PCM wave files can cause SIG_ARITHMETIC #14

merged 1 commit into from Jul 28, 2011

Conversation

sbooth
Copy link
Contributor

@sbooth sbooth commented Jul 28, 2011

In a previous patch I submitted code to read the sample width and frame count for wav and aiff files. There was a bug in that code that leads to a crash on certain wav files. I've seen this in a wav that has an audio format of MP3 (0x55). Since the wav header indicates that the bit depth is 0 (compressed), a divide by zero error occurs when calculating the total audio frames. I've no idea why you would put MP3 data in a wav, but regardless, the code shouldn't crash.

I went ahead and added checks to the aiff code as well, although I haven't received any crash reports in the wild for those kind of files.

I've seen this in a wav that has an audio format of MP3 (0x55)
@scotchi
Copy link
Member

scotchi commented Jul 28, 2011

Would probably be nice to have such a wav file for testing...

scotchi added a commit that referenced this pull request Jul 28, 2011
Some non-PCM wave files can cause SIG_ARITHMETIC
@scotchi scotchi merged commit e9cd383 into taglib:master Jul 28, 2011
@sbooth
Copy link
Contributor Author

sbooth commented Jul 28, 2011

I couldn't add an attachment to this pull request but an example of such a file is http://dl.dropbox.com/u/21004626/peanuts_teacher.wav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants