[FFmpeg-cvslog] r25318 - trunk/libavformat/applehttp.c
mstorsjo
subversion
Sat Oct 2 23:58:36 CEST 2010
Author: mstorsjo
Date: Sat Oct 2 23:58:36 2010
New Revision: 25318
Log:
applehttp: Handle a .. path segment in the base url
Modified:
trunk/libavformat/applehttp.c
Modified: trunk/libavformat/applehttp.c
==============================================================================
--- trunk/libavformat/applehttp.c Sat Oct 2 23:58:13 2010 (r25317)
+++ trunk/libavformat/applehttp.c Sat Oct 2 23:58:36 2010 (r25318)
@@ -104,6 +104,12 @@ static void make_absolute_url(char *buf,
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
More information about the ffmpeg-cvslog
mailing list