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
85 }85 }
86 s->frame_len = 1 << frame_len_bits;86 s->frame_len = 1 << frame_len_bits;
87 87
88 if (s->channels > MAX_CHANNELS) {88 if (avctx->channels > MAX_CHANNELS) {
89 av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);89 av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels);
90 return -1;90 return -1;
91 }91 }
92 92

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