[SCM] libav/experimental: applehttp: Handle a .. path segment in the base url
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:16:52 UTC 2013
The following commit has been merged in the experimental branch:
commit 9d229ef9e6505f3780df9f7e6b362612b2d53875
Author: Martin Storsjö <martin at martin.st>
Date: Sat Oct 2 21:58:36 2010 +0000
applehttp: Handle a .. path segment in the base url
Originally committed as revision 25318 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index f8f1f39..f2f5838 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -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
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list