demux_mf: don't run glob() on urls
Not intended to be run on urls. Fixes stack-overflow in glob() when unexpected data is passed. Found by OSS-Fuzz.
This commit is contained in:
1 parent
c2fc6503fb
commit
024c79a53c
1 file changed
+5
-1
+5
-1
@@ -119,7 +119,11 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct demuxer *d, char *filename
|
||||
goto exit_mf;
|
||||
}
|
||||
|
||||
size_t fname_avail = strlen(filename) + 32;
|
||||
bstr bfilename = bstr0(filename);
|
||||
if (mp_is_url(bfilename))
|
||||
goto exit_mf;
|
||||
|
||||
size_t fname_avail = bfilename.len + 32;
|
||||
char *fname = talloc_size(mf, fname_avail);
|
||||
|
||||
#if HAVE_GLOB
|
||||
|
||||
Reference in new issue
Block a user