mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ivi_common: check ref_tile size, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a93c7ca6ef
commit
dab70c62d2
@ -308,7 +308,10 @@ av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_hei
|
|||||||
|
|
||||||
tile->ref_mbs = 0;
|
tile->ref_mbs = 0;
|
||||||
if (p || b) {
|
if (p || b) {
|
||||||
tile->ref_mbs = ref_tile->mbs;
|
if (tile->num_MBs <= ref_tile->num_MBs) {
|
||||||
|
tile->ref_mbs = ref_tile->mbs;
|
||||||
|
}else
|
||||||
|
av_log(0, AV_LOG_DEBUG, "Cannot use ref_tile, too few mbs\n");
|
||||||
ref_tile++;
|
ref_tile++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user