ffmpeg | branch: master | Michael Goulet <mgou...@fb.com> | Thu Jun 16 17:52:56 2022 +0200| [0aa5dd084b8e26c9d644354c42c9252cf3b19cea] | committer: Thilo Borgmann
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). > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0aa5dd084b8e26c9d644354c42c9252cf3b19cea --- libavcodec/libx264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 14177b3016..616d855067 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -940,7 +940,9 @@ static av_cold int X264_init(AVCodecContext *avctx) return ret; } p= strchr(p, ':'); - p+=!!p; + if (p) { + ++p; + } } } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".