Commit b707abf0 authored by Steven Liu's avatar Steven Liu

avformat/url: check the result of the strrchr

because it need be check for success, is should not
change the old way if it failure.
fix ticket: 8674
Signed-off-by: 's avatarSteven Liu <liuqi05@kuaishou.com>
parent 9a8b984e
......@@ -182,7 +182,7 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
/* Remove the file name from the base url */
sep = strrchr(buf, '/');
if (sep <= root)
if (sep && sep <= root)
sep = root;
if (sep)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment