Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit
12576afe206d35231ccd61f9033c5fdab6a11e80)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/adpcm.c
src++;
*samples++ = cs->predictor;
}
- for (n = nb_samples >> (1 - st); n > 0; n--, src++) {
+ for (n = (nb_samples >> (1 - st)) - 1; n > 0; n--) {
uint8_t v = *src;
*samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v >> 4 , 3);
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);