1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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).
This commit is contained in:
Michael Goulet 2022-06-16 17:52:56 +02:00 committed by Thilo Borgmann
parent 6c3a82f043
commit 0aa5dd084b

View File

@ -940,7 +940,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
return ret;
}
p= strchr(p, ':');
p+=!!p;
if (p) {
++p;
}
}
}