[FFmpeg-trac] #8814(avformat:open): Can't open HTTP URL whose file name contains ".."
FFmpeg
trac at avcodec.org
Sat Jul 25 08:48:13 EEST 2020
#8814: Can't open HTTP URL whose file name contains ".."
------------------------------------+-------------------------------------
Reporter: jzlomek | Owner: stevenliu
Type: defect | Status: open
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: URL | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-------------------------------------
Comment (by jzlomek):
It is better but still not correct. Consider this test:
test("http://server/foo/bar",
"a/b/../c/d/../e../.../..f/g../h../other/url/a.mp3/...");
It should give
"http://server/foo/bar/a/c/e../.../..f/g../h../other/url/a.mp3/...".
I think the best would be to use strtok(p, "/") to split the path into the
components and for each ".." component remove the previous one (if there
are some still).
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8814#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list