[FFmpeg-devel] [PATCH 1/2] avcodec/h264_parser: Fix undefined left shift

Michael Niedermayer michael at niedermayer.cc
Fri May 29 23:39:47 EEST 2020


On Fri, May 29, 2020 at 06:17:54PM +0200, Andreas Rheinhardt wrote:
> Use an uint32_t for the NAL unit size of an AVC H.264 NAL unit instead
> of an int as a left shift of a signed value is undefined behaviour
> if the result doesn't fit into the target type.
> 
> Also make the log message never output negative lengths.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavcodec/h264_parser.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

probably ok

thx

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

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200529/64b3ecb6/attachment.sig>


More information about the ffmpeg-devel mailing list