mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-14 19:25:01 +00:00
applehttp: Handle a .. path segment in the base url
Originally committed as revision 25318 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
978a5ce82e
commit
9d229ef9e6
@ -104,6 +104,12 @@ static void make_absolute_url(char *buf, int size, const char *base,
|
||||
while (av_strstart(rel, "../", NULL) && sep) {
|
||||
sep[0] = '\0';
|
||||
sep = strrchr(buf, '/');
|
||||
/* If the next directory name to pop off is "..", break here */
|
||||
if (!strcmp(sep ? &sep[1] : buf, "..")) {
|
||||
/* Readd the slash we just removed */
|
||||
av_strlcat(buf, "/", size);
|
||||
break;
|
||||
}
|
||||
if (sep)
|
||||
sep[1] = '\0';
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user