mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
lavf/avio: check for : in filenames for protocols.
If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.
Fix trac ticket #2303.
(cherry picked from commit d9fad53f4b)
This commit is contained in:
committed by
Carl Eugen Hoyos
parent
381e3e7e44
commit
a8b92c4b3c
@@ -210,7 +210,9 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags,
|
||||
"Missing call to av_register_all()?\n");
|
||||
}
|
||||
|
||||
if (filename[proto_len] != ':' && filename[proto_len] != ',' || is_dos_path(filename))
|
||||
if (filename[proto_len] != ':' &&
|
||||
(filename[proto_len] != ',' || !strchr(filename + proto_len + 1, ':')) ||
|
||||
is_dos_path(filename))
|
||||
strcpy(proto_str, "file");
|
||||
else
|
||||
av_strlcpy(proto_str, filename, FFMIN(proto_len+1, sizeof(proto_str)));
|
||||
|
||||
Reference in New Issue
Block a user