Browse Source

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>
tags/n4.3
Steven Liu 5 years ago
parent
commit
b707abf091
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/url.c

+ 1
- 1
libavformat/url.c View File

@@ -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)


Loading…
Cancel
Save