mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/g2meet: fix stride calculation, use correct format field
Fixes out of array accesses Fixes: asan_heap-oob_ae5f63_5415_g2m4.wmv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7043311969
commit
83f7bd6dcf
|
@ -490,7 +490,7 @@ static int g2m_load_cursor(AVCodecContext *avctx, G2MContext *c,
|
|||
cursor_hot_y = bytestream2_get_byte(gb);
|
||||
cursor_fmt = bytestream2_get_byte(gb);
|
||||
|
||||
cursor_stride = FFALIGN(cursor_w, c->cursor_fmt==1 ? 32 : 1) * 4;
|
||||
cursor_stride = FFALIGN(cursor_w, cursor_fmt==1 ? 32 : 1) * 4;
|
||||
|
||||
if (cursor_w < 1 || cursor_w > 256 ||
|
||||
cursor_h < 1 || cursor_h > 256) {
|
||||
|
|
Loading…
Reference in New Issue