Re: [FFmpeg-devel] [PATCH] avcodec/lossless_videoencdsp: Fix unaligned access

2024-03-14 Thread Sean McGovern
Andreas: On Tue, Mar 12, 2024 at 8:42 PM Andreas Rheinhardt wrote: > > HAVE_FAST_UNALIGNED being true does not imply that > one can simply read from any pointer via *(long*). > It is undefined behaviour in case the pointer is not > sufficiently aligned; and even if it is, it is (likely) > a

[FFmpeg-devel] [PATCH] avcodec/lossless_videoencdsp: Fix unaligned access

2024-03-12 Thread Andreas Rheinhardt
HAVE_FAST_UNALIGNED being true does not imply that one can simply read from any pointer via *(long*). It is undefined behaviour in case the pointer is not sufficiently aligned; and even if it is, it is (likely) a violation of the effective-type rules. Fix both of these by using the appropriate