History

binkaudio: fix channel count check

Perform validity check on AVFormatContext.channels instead of uninitialised field. This fixes issue 2001.

Peter Ross committed 15 years ago

Commit 13690151 parent 73b3b521 file · +2 −2Browse files

Unified · Split

libavcodec/binkaudio.c+2−2
@@ -85,8 +85,8 @@ static av_cold int decode_init(AVCodecContext *avctx) · 84 unmodified lines
8585 }
8686 s->frame_len = 1 << frame_len_bits;
8787
88− if (s->channels > MAX_CHANNELS) {
89− av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
88+ if (avctx->channels > MAX_CHANNELS) {
89+ av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels);
9090 return -1;
9191 }
9292

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