aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-02 16:07:55 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-14 15:53:41 -0400
commit439998e18bdbdabd010fd9ab676a7298b62bf53d (patch)
tree5e0b46ebf80a67c735bd797cb125e9414fdcebd5 /libavcodec
parentff5790c76102ef2574e94c77edf2d7e81eb40752 (diff)
downloadffmpeg-439998e18bdbdabd010fd9ab676a7298b62bf53d.tar.gz
adpcmdec: check remaining buffer size before decoding next block in the
ADPCM IMA WAV decoder.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/adpcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 200957b26c..774193e1b2 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -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 */
}
- while(src < buf + buf_size){
+ while (src <= buf + buf_size - (avctx->channels * 4)) {
for (i = 0; i < avctx->channels; i++) {
cs = &c->status[i];
for (m = 0; m < 4; m++) {