From fc22ddf378014a5182d1b0ad40f21b2277350cc7 Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Tue, 9 Feb 2010 16:19:57 +0100 Subject: [PATCH] Sanitize output from str_format() before using it to build the snapshot's filename. --- src/video_output/snapshot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_output/snapshot.c b/src/video_output/snapshot.c index 1b06aea3ba..3829eb2710 100644 --- a/src/video_output/snapshot.c +++ b/src/video_output/snapshot.c @@ -150,7 +150,10 @@ int vout_snapshot_SaveImage(char **name, int *sequential, char *prefix = NULL; if (cfg->prefix_fmt) prefix = str_format(object, cfg->prefix_fmt); - if (!prefix) { + if (prefix) + filename_sanitize(prefix); + else + { prefix = strdup("vlcsnap-"); if (!prefix) goto error; -- 2.39.2