You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
av_url_split: dont let '/' char whallop '?' char
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
21fb7ff35b
commit
1be55c82a5
@@ -4076,7 +4076,7 @@ void av_url_split(char *proto, int proto_size,
|
|||||||
char *path, int path_size,
|
char *path, int path_size,
|
||||||
const char *url)
|
const char *url)
|
||||||
{
|
{
|
||||||
const char *p, *ls, *at, *col, *brk;
|
const char *p, *ls, *ls2, *at, *col, *brk;
|
||||||
|
|
||||||
if (port_ptr) *port_ptr = -1;
|
if (port_ptr) *port_ptr = -1;
|
||||||
if (proto_size > 0) proto[0] = 0;
|
if (proto_size > 0) proto[0] = 0;
|
||||||
@@ -4098,8 +4098,11 @@ void av_url_split(char *proto, int proto_size,
|
|||||||
|
|
||||||
/* separate path from hostname */
|
/* separate path from hostname */
|
||||||
ls = strchr(p, '/');
|
ls = strchr(p, '/');
|
||||||
|
ls2 = strchr(p, '?');
|
||||||
if(!ls)
|
if(!ls)
|
||||||
ls = strchr(p, '?');
|
ls = ls2;
|
||||||
|
else if (ls && ls2)
|
||||||
|
ls = FFMIN(ls, ls2);
|
||||||
if(ls)
|
if(ls)
|
||||||
av_strlcpy(path, ls, path_size);
|
av_strlcpy(path, ls, path_size);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user