[FFmpeg-devel] [PATCH 1/3] avfilter/vf_ssim360: Use correct type in sizeof

Jan Ekström jeebjp at gmail.com
Tue Mar 14 00:53:51 EET 2023


On Sun, Mar 12, 2023 at 11:52 PM Andreas Rheinhardt
<andreas.rheinhardt at outlook.com> wrote:
>
> SSIM360Context.ssim360_hist is an array of four pointers to double;
> so sizeof(*ssim360_hist[0]) (=sizeof(double)) is the correct size
> to use to calculate the amount of memory to allocate, not
> sizeof(*ssim360_hist) (which is sizeof(double*)).
>
> Use FF_ALLOCZ_TYPED_ARRAY to avoid this issue altogether.
>
> Fixes Coverity issue #1520671.
>

This set LGTM. Nice fixes and clean-ups in both vf_ssim360 and libx264.

Jan


More information about the ffmpeg-devel mailing list