History

avcodec/wavpack: Treat the first block coding too many channels as an error

Fixes memleak Fixes: 236/8aeebc9ca49b91bf71c114dcefac56c154a3a563

Michael Niedermayer committed 9 years ago

Commit c188f351 parent 6b95da91 file · +1 −1Browse files

Unified · Split

libavcodec/wavpack.c+1−1
@@ -1016,7 +1016,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, · 1015 unmodified lines
1016 1016
1017 if (wc->ch_offset + s->stereo >= avctx->channels) {1017 if (wc->ch_offset + s->stereo >= avctx->channels) {
1018 av_log(avctx, AV_LOG_WARNING, "Too many channels coded in a packet.\n");1018 av_log(avctx, AV_LOG_WARNING, "Too many channels coded in a packet.\n");
1019 return (avctx->err_recognition & AV_EF_EXPLODE) ? AVERROR_INVALIDDATA : 0;1019 return ((avctx->err_recognition & AV_EF_EXPLODE) || !wc->ch_offset) ? AVERROR_INVALIDDATA : 0;
1020 }1020 }
1021 1021
1022 samples_l = frame->extended_data[wc->ch_offset];1022 samples_l = frame->extended_data[wc->ch_offset];

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