]> git.sesse.net Git - vlc/blobdiff - src/video_output/snapshot.c
Sanitize output from str_format() before using it to build the snapshot's filename.
[vlc] / src / video_output / snapshot.c
index 1b06aea3bac99b518b39db76df862d0a5ec7ff9e..3829eb27106099349cfbdeefcbf48467ab587d60 100644 (file)
@@ -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;