Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Avoid function pointer casts, fix UB

2024-02-25 Thread Mark Thompson
On 25/02/2024 01:55, Andreas Rheinhardt wrote: The SEI message read/write functions are called via function pointers where the SEI message-specific context is passed as void*. But the actual function definitions use a pointer to their proper context in place of void*, making the calls undefined b

[FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Avoid function pointer casts, fix UB

2024-02-24 Thread Andreas Rheinhardt
The SEI message read/write functions are called via function pointers where the SEI message-specific context is passed as void*. But the actual function definitions use a pointer to their proper context in place of void*, making the calls undefined behaviour. Clang UBSan 17 warns about this. This