mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
demux_mf: replace unsafe string functions
This commit is contained in:
parent
356096b954
commit
57f00a0372
@ -126,10 +126,9 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct demuxer *d, char *filename
|
||||
|
||||
#if HAVE_GLOB
|
||||
if (!strchr(filename, '%')) {
|
||||
strcpy(fname, filename);
|
||||
if (!strchr(filename, '*'))
|
||||
strcat(fname, "*");
|
||||
|
||||
// append * if none present
|
||||
snprintf(fname, fname_avail, "%s%c", filename,
|
||||
strchr(filename, '*') ? 0 : '*');
|
||||
mp_info(log, "search expr: %s\n", fname);
|
||||
|
||||
glob_t gg;
|
||||
|
Loading…
Reference in New Issue
Block a user