[FFmpeg-devel] [PATCH V4] lavc/golomb: Fix UE golomb overwrite issue.

Michael Niedermayer michael at niedermayer.cc
Tue Jun 13 04:33:23 EEST 2017


On Fri, Jun 09, 2017 at 10:34:19AM +0800, Jun Zhao wrote:
> V4: Fix rang check error in assert base on Mark's review
> V3: Clean the code logic base on Michael's review.
> V2: Add set_ue_golomb_long() to support 32bits UE golomb and update the unit test.

>  golomb.h       |   17 ++++++++++++++++-
>  put_bits.h     |   35 +++++++++++++++++++++++++++++++++++
>  tests/golomb.c |   19 +++++++++++++++++++
>  3 files changed, 70 insertions(+), 1 deletion(-)
> 6bed99e213506530c7a58c6bffda43607a7be37c  0001-lavc-golomb-Fix-UE-golomb-overwrite-issue.patch
> From fa3f59e5fcb2cddcc44b0e895bfa02caa491fee5 Mon Sep 17 00:00:00 2001
> From: Jun Zhao <jun.zhao at intel.com>
> Date: Fri, 2 Jun 2017 15:05:49 +0800
> Subject: [PATCH V4] lavc/golomb: Fix UE golomb overwrite issue.
> 
> put_bits just support write up to 31 bits, when write 32 bit in
> put_bits, it's will overwrite the bit buffer, because the default
> assert level is 0, the av_assert2(n <= 31 && value < (1U << n))
> in put_bits can not be trigger runtime. Add set_ue_golomb_long()
> to support 32bits UE golomb.
> 
> Signed-off-by: Jun Zhao <jun.zhao at intel.com>
> ---
>  libavcodec/golomb.h       | 17 ++++++++++++++++-
>  libavcodec/put_bits.h     | 35 +++++++++++++++++++++++++++++++++++
>  libavcodec/tests/golomb.c | 19 +++++++++++++++++++
>  3 files changed, 70 insertions(+), 1 deletion(-)

This should be 3 patches
1. changes to set_ue_golomb() commet
2. addition of put_bits64()
3. addition of set_ue_golomb_long()

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170613/e7bfaadf/attachment.sig>


More information about the ffmpeg-devel mailing list