1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-24 17:12:34 +02:00

fftools/ffmpeg_mux_init: avoid invalid reads in forced keyframe parsing

Fixes #10243
This commit is contained in:
Anton Khirnov 2023-03-10 13:36:48 +01:00
parent 49b733c73c
commit 1e406692e5

View File

@ -2063,7 +2063,7 @@ static void parse_forced_key_frames(KeyframeForceCtx *kf, const Muxer *mux,
if (next) if (next)
*next++ = 0; *next++ = 0;
if (!memcmp(p, "chapters", 8)) { if (strstr(p, "chapters") == p) {
AVChapter * const *ch = mux->fc->chapters; AVChapter * const *ch = mux->fc->chapters;
unsigned int nb_ch = mux->fc->nb_chapters; unsigned int nb_ch = mux->fc->nb_chapters;
int j; int j;