1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-12-20 14:16:06 +02:00
Files
FFmpeg/libavcodec/cbs_internal.h
Mark Thompson 0e782661d6 cbs_h264: Fix overflow in shifts
The type of the result of a shift operation is unaffected by the type of
the right operand, so some existing code overflows with undefined behaviour
when the element length is 32.  Add a helper macro to calculate the maximum
value correctly and then use it everywhere this pattern appears.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2018-03-18 17:54:55 +00:00

3.3 KiB