Browse code

Use av_strlcpy instead of snprintf without formatting. Prevents warnings about "format not a string literal and no format arguments". patch by Patrik Kullman, patrik yes nu

Originally committed as revision 17141 to svn://svn.ffmpeg.org/ffmpeg/trunk

Patrik Kullman authored on 2009/02/11 09:07:32
Showing 1 changed files
... ...
@@ -3717,7 +3717,7 @@ static int opt_preset(const char *opt, const char *arg)
3717 3717
     }
3718 3718
     if(!f && ((arg[0]=='.' && arg[1]=='/') || arg[0]=='/' ||
3719 3719
               is_dos_path(arg))){
3720
-        snprintf(filename, sizeof(filename), arg);
3720
+        av_strlcpy(filename, arg, sizeof(filename));
3721 3721
         f= fopen(filename, "r");
3722 3722
     }
3723 3723