[FFmpeg-devel] [PATCH] lavc/libx264.c: Fix possible UB by NULL pointer LHS
Michael Niedermayer
michael at niedermayer.cc
Thu Jun 16 23:01:10 EEST 2022
On Thu, Jun 16, 2022 at 05:58:09PM +0200, Thilo Borgmann wrote:
> Hi,
>
> the LHS pointer might be NULL so that += would be UB.
>
> Thanks,
> Thilo
> libx264.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 558de1ca7a30aa728193297a7d605c051b5bbfc0 0001-lavc-libx264.c-Fix-possible-UB-by-NULL-pointer-LHS.patch
> From cfb7ce8092c34436fae3120645aa96fe082af4ea Mon Sep 17 00:00:00 2001
> From: Michael Goulet <mgoulet at fb.com>
> Date: Thu, 16 Jun 2022 17:52:56 +0200
> Subject: [PATCH] lavc/libx264.c: Fix possible UB by NULL pointer LHS
>
> It is UB to attempt to do pointer arithmetic on NULL pointer LHS, even if that pointer arithmetic ends up being "+= 0" (i.e. !!p == 0 if p == NULL).
> ---
> libavcodec/libx264.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
should be ok
[...]
thx
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Whats the most studid thing your enemy could do ? Blow himself up
Whats the most studid thing you could do ? Give up your rights and
freedom because your enemy blew himself up.
-------------- 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/20220616/1cd673a1/attachment.sig>
More information about the ffmpeg-devel
mailing list