[FFmpeg-devel] [PATCH]lavc/avpacket: Fix undefined behaviour, do not pass null pointer to memcpy()

Nicolas George george at nsup.org
Sun Sep 4 22:24:56 EEST 2016


Le nonidi 19 fructidor, an CCXXIV, Carl Eugen Hoyos a écrit :
> From a3dcd65c313e6b456fcb05915508d8d583c1840e Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> Date: Sun, 4 Sep 2016 21:11:02 +0200
> Subject: [PATCH] lavc/avpacket: Fix undefined behaviour, do not pass a null
>  pointer to memcpy().

I read the spec for memcpy(), passing NULL is not stated as an undefined
behaviour if the size if 0. UBSan seems to be reporting a false positive.

I do not object to the patch, but the commit message could state the bug is
not ours.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160904/e008cbd4/attachment.sig>


More information about the ffmpeg-devel mailing list