History

Check for inconsistent number of channels.

The frontend does not support audio output when the number of channels changes between frames. Check if the number of decoded channels matches the number of audio output channels. It is possible that this condition should be detected in the decoder instead of the frontend. Fixes crash from afl-fuzz.

Andrew Wesie committed 6 years ago

Commit 4ed30d31 parent b5884011 file · +4 −0Browse files

Unified · Split

frontend/main.c+4−0
@@ -699,6 +699,10 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std · 698 unmodified lines
699699 /* update buffer indices */
700700 advance_buffer(&b, frameInfo.bytesconsumed);
701701
702+ /* check if the inconsistent number of channels */
703+ if (aufile != NULL && frameInfo.channels != aufile->channels)
704+ frameInfo.error = 12;
705+
702706 if (frameInfo.error > 0)
703707 {
704708 faad_fprintf(stderr, "Error: %s\n",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t