On Mon, Jul 27, 2020 at 8:57 PM Marton Balint wrote:
> It should be implemented in a way which does not use a temporary buffer.
> Seems doable.
>
You are right. I will submit a new version.
Best regards,
Josef
___
ffmpeg-devel mailing list
On Mon, 27 Jul 2020, Steven Liu wrote:
Marton Balint 于2020年7月25日周六 下午5:40写道:
On Sat, 25 Jul 2020, Zlomek, Josef wrote:
> Hi Steven,
>
> 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/...");
>
Steven Liu (12020-07-27):
> What about use av_malloc? or bprint?
> I think use av_malloc maybe easter to me.
For internal APIs, definitely BPrint over naive av_malloc(). But this is
unrelated to the issue at hand: the size limit exists in the caller of
this function, not in this function.
Marton Balint 于2020年7月25日周六 下午5:40写道:
>
>
>
> On Sat, 25 Jul 2020, Zlomek, Josef wrote:
>
> > Hi Steven,
> >
> > 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 "
> >
I will submit patch on monday.
Josef
On Sat, Jul 25, 2020 at 8:27 AM 刘歧 wrote:
>
>
> 在 2020/7/25 下午2:11,“ffmpeg-devel 代表 Zlomek, Josef”<
> ffmpeg-devel-boun...@ffmpeg.org 代表 jo...@pex.com> 写入:
>
> Hi Steven,
>
> It is better but still not correct. Consider this test:
>
>
Marton Balint 于2020年7月25日周六 下午5:40写道:
> And I also would like to point out that using static strings with
> MAX_URL_SIZE is not OK. This function supports an arbitrary buffer size,
> so limiting it to MAX_URL_SIZE is a bug.
Okay, get it, i'm reworking.
Thanks
Steven
On Sat, 25 Jul 2020, Zlomek, Josef wrote:
Hi Steven,
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
Nicolas George 于2020年7月25日周六 下午4:44写道:
>
> Steven Liu (12020-07-25):
> > > And I think you would better rework the complete logic of the test:
> > agreed, I think need lots of testcase for the logic, ../ .../..
> > dummy../... .../..dummy and so on,
> > maybe need spend some time to do it :D
>
>
Steven Liu (12020-07-25):
> > And I think you would better rework the complete logic of the test:
> agreed, I think need lots of testcase for the logic, ../ .../..
> dummy../... .../..dummy and so on,
> maybe need spend some time to do it :D
I did not mean the FATE test for this feature, I meant
Nicolas George 于2020年7月25日周六 下午4:31写道:
>
> Steven Liu (12020-07-25):
> > fix ticket: 8814
> > if get ".." in the url, check next byte and lead byte by double dot,
> > it there have no '/' and not root node, it is not used go to directory ".."
> >
> > Signed-off-by: Steven Liu
> > ---
> >
刘歧 (12020-07-25):
> 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).
> I think you can submit patch if you have full idea for it.
strtok() is a terrible API, and
Steven Liu (12020-07-25):
> fix ticket: 8814
> if get ".." in the url, check next byte and lead byte by double dot,
> it there have no '/' and not root node, it is not used go to directory ".."
>
> Signed-off-by: Steven Liu
> ---
> libavformat/url.c | 12
> 1 file changed, 12
在 2020/7/25 下午2:11,“ffmpeg-devel 代表 Zlomek,
Josef” 写入:
Hi Steven,
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 "
Hi Steven,
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
fix ticket: 8814
if get ".." in the url, check next byte and lead byte by double dot,
it there have no '/' and not root node, it is not used go to directory ".."
Signed-off-by: Steven Liu
---
libavformat/url.c | 12
1 file changed, 12 insertions(+)
diff --git a/libavformat/url.c
15 matches
Mail list logo