History

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

Steven Liu committed 6 years ago

Commit b707abf1 parent 9a8b9841 file · +1 −1Browse files

Unified · Split

libavformat/url.c+1−1
@@ -182,7 +182,7 @@ void ff_make_absolute_url(char *buf, int size, const char *base, · 181 unmodified lines
182 182
183 /* Remove the file name from the base url */183 /* Remove the file name from the base url */
184 sep = strrchr(buf, '/');184 sep = strrchr(buf, '/');
185 if (sep <= root)185 if (sep && sep <= root)
186 sep = root;186 sep = root;
187 187
188 if (sep)188 if (sep)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t