[FFmpeg-cvslog] avfilter/vf_crop: prevent integer overflows when calculating SAR
James Almer
git at videolan.org
Thu Jul 11 16:31:21 EEST 2024
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jul 9 17:32:11 2024 -0300| [0b6c5e9df43f82ebe8161ddfb8e8d612387a53a1] | committer: James Almer
avfilter/vf_crop: prevent integer overflows when calculating SAR
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b6c5e9df43f82ebe8161ddfb8e8d612387a53a1
---
libavfilter/vf_crop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 6361209941..d4966323f5 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -206,7 +206,7 @@ static int config_input(AVFilterLink *link)
AVRational dar = av_mul_q(link->sample_aspect_ratio,
(AVRational){ link->w, link->h });
av_reduce(&s->out_sar.num, &s->out_sar.den,
- dar.num * s->h, dar.den * s->w, INT_MAX);
+ (int64_t)dar.num * s->h, (int64_t)dar.den * s->w, INT_MAX);
} else
s->out_sar = link->sample_aspect_ratio;
More information about the ffmpeg-cvslog
mailing list