mirror of https://git.ffmpeg.org/ffmpeg.git
kgv1dec: Increase offsets array size so it is large enough.
Fixes CVE-2011-3945 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit807a045ab7
) Signed-off-by: Alex Converse <alex.converse@gmail.com> (cherry picked from commita02e8df973
) (cherry picked from commitd5f2382d03
) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commita0b65938b7
) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
6ca010f209
commit
1156f07c6a
|
@ -38,7 +38,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||
const uint8_t *buf = avpkt->data;
|
||||
const uint8_t *buf_end = buf + avpkt->size;
|
||||
KgvContext * const c = avctx->priv_data;
|
||||
int offsets[7];
|
||||
int offsets[8];
|
||||
uint16_t *out, *prev;
|
||||
int outcnt = 0, maxcnt;
|
||||
int w, h, i;
|
||||
|
@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||
return -1;
|
||||
c->prev = prev;
|
||||
|
||||
for (i = 0; i < 7; i++)
|
||||
for (i = 0; i < 8; i++)
|
||||
offsets[i] = -1;
|
||||
|
||||
while (outcnt < maxcnt && buf_end - 2 > buf) {
|
||||
|
|
Loading…
Reference in New Issue