diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-19 02:49:04 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-19 19:13:05 +0200 |
commit | 141f03541b39e131a5e8aa776a88abe77b70618e (patch) | |
tree | 6feaa685df03910c39d317d67522cb1f912200f4 /libavutil/opt.c | |
parent | 15f03725ced37e3b99e76f63f52cb92e10f134e2 (diff) | |
download | ffmpeg-141f03541b39e131a5e8aa776a88abe77b70618e.tar.gz |
opt: do not crash in av_set_options_string() if opts == NULL
Add missing NULL check, and update documentation accordingly.
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 8c351488a8..c0b529b8ea 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -521,6 +521,8 @@ int av_set_options_string(void *ctx, const char *opts, { int ret, count = 0; + if (!opts) + return 0; while (*opts) { if ((ret = parse_key_value_pair(ctx, &opts, key_val_sep, pairs_sep)) < 0) return ret; |