[FFmpeg-devel] [PATCH] swscale/x86/yuv_2_rgb: fix access to memory past the frame data in yuv to rgb conversion

Anton Khirnov anton at khirnov.net
Wed Jun 1 12:45:15 EEST 2022


Quoting Vardan Margaryan (2022-05-23 18:06:16)
> Y, U, V data is loaded at the end of the current iteration for the next 
> iteration.
> It results in memory access past the frame data on the last iteration 
> (that data is never used after the loading).
> 
> So load data at the start of the iteration, so that only useful data is 
> loaded.
> 
> Signed-off-by: Vardan Margaryan <v.t.margaryan at gmail.com>
> ---
>   libswscale/x86/yuv_2_rgb.asm | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)

I'm not an expert on this code, but the patch looks good and it fixes
some invalid reads for me, so will push in a few days if nobody objects.

Also note that your mailer mangled the patch, so it could not be applied
automatically with 'git am', please fix this in future submissions e.g.
by attaching the patch or sending it with git send-email.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list