misc/image: ImageRead: use vlc_format_Copy
If the decoder allocates data within video_format_t.p_palette, the
previous implementation would result in a use-after-free (among other
issues) due to the ownership of said p_palette not being well-defined.
This fixes the issue by using video_format_Copy, so that the two fmts
do not refer to the same palette.
fixes: #18334
Signed-off-by:
Rémi Denis-Courmont <remi@remlab.net>
Please register or sign in to comment