iceray via ffmpeg-devel (HE12026-06-08):
> >From c2e701a14770f8dbd69ce17d2766e4a8eb32f57d Mon Sep 17 00:00:00 2001
> From: iceray <[email protected]>
> Date: Mon, 8 Jun 2026 13:06:16 +0000
> Subject: [PATCH 2/2] Update to fix UBSan Bug by iceray in
> libavformat/sbgdec.c:386:44
>
> runtime error: 1.84467e+22 is outside the range of representable values of
> type 'long'
> ---
> libavformat/sbgdec.c | 5 +++++
> 1 file changed, 5 insertions(+)
I think this is a non-issue, but I do not object to fixing this
non-issue.
>
> diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c
> index 71cbad2dae..e1f202ffea 100644
> --- a/libavformat/sbgdec.c
> +++ b/libavformat/sbgdec.c
> @@ -384,6 +384,11 @@ static int parse_options(struct sbg_parser *p)
> "syntax error for option -F");
> return AVERROR_INVALIDDATA;
> }
> + if (!(v >= 0 && v <= (double)(INT64_MAX / (AV_TIME_BASE
> / 1000)))) {
> + snprintf(p->err_msg, sizeof(p->err_msg),
> + "syntax error for option -F");
> + return AVERROR_INVALIDDATA;
> + }
Please merge the conditions instead of duplicating the error message and
return statement.
> p->scs.opt_fade_time = v * AV_TIME_BASE / 1000;
> break;
> case 'L':
Regards,
--
Nicolas George
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]