[FFmpeg-devel] [PATCH] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit
Alexander Strasser
eclipse7 at gmx.net
Sun Jul 14 15:34:47 EEST 2024
On 2024-07-10 15:51 +0200, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2024-07-10 15:44:47)
> > Do you still object to a 32bit check on width and height ?
> > If not i intend to apply a patch adding such limits
> > If you object i will take this to the TC
>
> In my first reply in this thread I asked for a very simple thing -
> justify this commit, as the commit message provided ZERO arguments for
> why is this done and what it actually improves.
>
> Instead of answering the question you keep painting ever wordier walls
> of text. I'm not reading all that. Just answer the question, in the form
> suitable for a commit message.
As most of the time a communications problem AFAICS :(
The answer Anton was probably looking for:
The intention of av_image_check_size2 (and it it's predecessors)
always was to use a bigger integer type (64bit) to check width and
height fit into the limits of the next smaller integer type (32bit).
Unfortunately it wasn't spelled out explicitly in the commit
message back then, and the implementation incorrectly assumed
that INT_MAX would always refer to 32bit signed max.
Alexander
More information about the ffmpeg-devel
mailing list