Fixes out of array accesses
Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 105654e376a736d243aef4a1d121abebce912e6b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -388,6 +388,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, |
388 | 388 |
w_align = 4; |
389 | 389 |
h_align = 4; |
390 | 390 |
} |
391 |
+ if (s->codec_id == AV_CODEC_ID_JV) { |
|
392 |
+ w_align = 8; |
|
393 |
+ h_align = 8; |
|
394 |
+ } |
|
391 | 395 |
break; |
392 | 396 |
case AV_PIX_FMT_BGR24: |
393 | 397 |
if ((s->codec_id == AV_CODEC_ID_MSZH) || |