]> git.sesse.net Git - vlc/commitdiff
Sanitize output from str_format() before using it to build the snapshot's filename.
authorAntoine Cellerier <dionoea@videolan.org>
Tue, 9 Feb 2010 15:19:57 +0000 (16:19 +0100)
committerAntoine Cellerier <dionoea@videolan.org>
Tue, 9 Feb 2010 15:19:57 +0000 (16:19 +0100)
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;