[vlc-devel] commit: Sanitize output from str_format() before using it to build the snapshot's filename. (Antoine Cellerier )

git version control git at videolan.org
Tue Feb 9 16:20:22 CET 2010


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Tue Feb  9 16:19:57 2010 +0100| [fc22ddf378014a5182d1b0ad40f21b2277350cc7] | committer: Antoine Cellerier 

Sanitize output from str_format() before using it to build the snapshot's filename.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc22ddf378014a5182d1b0ad40f21b2277350cc7
---

 src/video_output/snapshot.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/video_output/snapshot.c b/src/video_output/snapshot.c
index 1b06aea..3829eb2 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;




More information about the vlc-devel mailing list