This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 05e6e90e3f1284e71ea98e17c9f16391c302514b Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Sep 17 18:02:03 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Sat Sep 19 18:47:12 2026 +0000 avcodec/mpegvideo_enc: reject pts outside the range the MPEG-4 time can represent Fixes: signed integer overflow Found during review of the fix for 1XvjZP0UGl6O --- libavcodec/mpegvideo_enc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 3d749360f9..f52e3617d7 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1301,6 +1301,13 @@ static int load_input_picture(MPVMainEncContext *const m, const AVFrame *pic_arg display_picture_number = m->input_picture_number++; if (pts != AV_NOPTS_VALUE) { + if (s->c.codec_id == AV_CODEC_ID_MPEG4 && + (pts > INT64_MAX / 2 / s->c.avctx->time_base.num || + pts < INT64_MIN / 2 / s->c.avctx->time_base.num)) { + av_log(s->c.avctx, AV_LOG_ERROR, "pts %"PRId64" is out of the supported range\n", pts); + return AVERROR_PATCHWELCOME; + } + if (m->user_specified_pts != AV_NOPTS_VALUE) { int64_t last = m->user_specified_pts; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
