[FFmpeg-devel] [PATCH v5] avcodec/cbs_vp8: Use little endian in fixed() and improve the pos check

Anton Khirnov anton at khirnov.net
Wed Jan 24 13:41:22 EET 2024


Quoting Dai, Jianhui J (2024-01-23 03:58:24)
> This commit adds value range checks to cbs_vp8_read_unsigned_le,
> migrates fixed() to use it, and enforces little-endian consistency for
> all read methods.
> 
> The VP8 compressed header may not be byte-aligned due to boolean coding.
> Use bitwise comparison to prevent the potential overread.
> 
> TETS: ffmpeg -i fate-suite/vp8-test-vectors-r1/* -vcodec copy -bsf:v
> trace_headers -f null -
> 
> Signed-off-by: Jianhui Dai <jianhui.j.dai at intel.com>
> ---
>  libavcodec/cbs_vp8.c | 53 +++++++++++++++++++++++++++++++-------------
>  1 file changed, 37 insertions(+), 16 deletions(-)

This patch seems to contain many unrelated cosmetic changes. Those
should be moved to a separate patch.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list