adpcmdec: check remaining buffer size before decoding next block in the
ADPCM IMA WAV decoder.
This commit is contained in:
parent
ff5790c761
commit
439998e18b
@ -431,7 +431,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
|
|||||||
if (*src++) av_log(avctx, AV_LOG_ERROR, "unused byte should be null but is %d!!\n", src[-1]); /* unused */
|
if (*src++) av_log(avctx, AV_LOG_ERROR, "unused byte should be null but is %d!!\n", src[-1]); /* unused */
|
||||||
}
|
}
|
||||||
|
|
||||||
while(src < buf + buf_size){
|
while (src <= buf + buf_size - (avctx->channels * 4)) {
|
||||||
for (i = 0; i < avctx->channels; i++) {
|
for (i = 0; i < avctx->channels; i++) {
|
||||||
cs = &c->status[i];
|
cs = &c->status[i];
|
||||||
for (m = 0; m < 4; m++) {
|
for (m = 0; m < 4; m++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user