mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
fftools/ffmpeg_demux: ensure tile grid stream groups are sane
This is already checked in libavformat, at least in the only demuxer that creates them, but best not risk an out-of-bounds access in case a new demuxer doesn't take the proper measures. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -1801,6 +1801,11 @@ static int istg_parse_tile_grid(const OptionsContext *o, Demuxer *d, InputStream
|
||||
|
||||
if (tg->nb_tiles == 1)
|
||||
return 0;
|
||||
if (!tg->nb_tiles) {
|
||||
av_log(istg, AV_LOG_FATAL, "A demuxer exported an invalid tile group stream group. "
|
||||
"This is a bug, please report it.\n");
|
||||
return AVERROR_BUG;
|
||||
}
|
||||
|
||||
memset(&opts, 0, sizeof(opts));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user