summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-15 01:28:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-15 01:30:38 +0100
commit785dc146544affcc6a5d01db0469535811530a65 (patch)
tree5768e68a837f6952756547466060e0922b114554 /libavcodec/adpcm.c
parent05fac0b45be2565de216abdb538446737557f273 (diff)
avcodec/adpcm: fix sample count for stereo SBPRO3
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f9b9902ed90_7462_new_alaw.voc Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 8e20de2a63..1005a1b443 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1310,7 +1310,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
byte & 0x0F, 4, 0);
}
} else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) {
- for (n = nb_samples / 3; n > 0; n--) {
+ for (n = (nb_samples<<st) / 3; n > 0; n--) {
int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
byte >> 5 , 3, 0);