Don't attempt to increase the cursor pointer if it was \0. Fixes invalid reads.
Signed-off-by: James Almer <jamr...@gmail.com> --- libavformat/concat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/concat.c b/libavformat/concat.c index aec1f52d8e..2560811ff9 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -251,7 +251,8 @@ static av_cold int concatf_open(URLContext *h, const char *uri, int flags) err = AVERROR(ENOMEM); break; } - cursor++; + if (*cursor) + cursor++; if (++len == SIZE_MAX / sizeof(*nodes)) { av_free(node_uri); -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".