[FFmpeg-cvslog] parse_options(): Avoid passing NULL as a string arg to fprintf

Jeff Downs git at videolan.org
Fri Jun 24 19:05:40 CEST 2011


ffmpeg | branch: master | Jeff Downs <heydowns at somuchpressure.net> | Thu Jun 23 14:12:37 2011 -0400| [f6d28cf02965e74ff2f772d8632b018375a6c346] | committer: Jeff Downs

parse_options(): Avoid passing NULL as a string arg to fprintf

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

 cmdutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index cd6d133..f538d98 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -281,7 +281,7 @@ unknown_opt:
                 *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
             } else if (po->u.func_arg) {
                 if (po->u.func_arg(opt, arg) < 0) {
-                    fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
+                    fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg ? arg : "[null]", opt);
                     exit(1);
                 }
             }



More information about the ffmpeg-cvslog mailing list