mirror of https://git.ffmpeg.org/ffmpeg.git
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: Steven Liu <liuqi05@kuaishou.com>
This commit is contained in:
parent
9a8b984efa
commit
b707abf091
|
@ -182,7 +182,7 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
|
||||||
|
|
||||||
/* Remove the file name from the base url */
|
/* Remove the file name from the base url */
|
||||||
sep = strrchr(buf, '/');
|
sep = strrchr(buf, '/');
|
||||||
if (sep <= root)
|
if (sep && sep <= root)
|
||||||
sep = root;
|
sep = root;
|
||||||
|
|
||||||
if (sep)
|
if (sep)
|
||||||
|
|
Loading…
Reference in New Issue