[FFmpeg-devel] [PATCH 1/2] avfilter/vf_addroi: Add missing NULL termination to addroi_var_names[]()

Alexander Strasser eclipse7 at gmx.net
Sun Jan 5 12:26:17 EET 2025


On 2025-01-05 05:44 +0100, Michael Niedermayer wrote:
> Fixes: out of array read
>
> Found-by: Elias Myllymäki <elias.myllymaki04p at gmail.com>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavfilter/vf_addroi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavfilter/vf_addroi.c b/libavfilter/vf_addroi.c
> index de857eced44..d6765e9d8cb 100644
> --- a/libavfilter/vf_addroi.c
> +++ b/libavfilter/vf_addroi.c
> @@ -39,6 +39,7 @@ enum {
>  static const char *const addroi_var_names[] = {
>      "iw",
>      "ih",
> +    NULL,
>  };
>
>  typedef struct AddROIContext {
> --

LGTM

Thanks,
  Alexander

P.S.
It's a bit funny how we talk in allmost all filters about
variables because these are called constants when it comes
down to the av_expr_parse_and_eval call.

Guess it's a point of view thing. From filter POV they
can be variable, from the POV of the single expression
evaluation they are constant :)


More information about the ffmpeg-devel mailing list