diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 02:46:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 02:46:25 +0100 |
commit | eb74839caa2c50018b1d5a88a43c3da9f4345a8d (patch) | |
tree | f28c2ba29959cae18641c0a214e4297a8c0dffce /libavutil/opt.c | |
parent | 3393cd85459cb9c23dec90373da91559987000ee (diff) | |
download | ffmpeg-eb74839caa2c50018b1d5a88a43c3da9f4345a8d.tar.gz |
avutil/opt: Check av_parse_color() return value
Fixes: CID1257007
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index d873bd205e..e43b5d8363 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1816,8 +1816,10 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o) return !av_cmp_q(*(AVRational*)dst, q); case AV_OPT_TYPE_COLOR: { uint8_t color[4] = {0, 0, 0, 0}; - if (o->default_val.str) - av_parse_color(color, o->default_val.str, -1, NULL); + if (o->default_val.str) { + if ((ret = av_parse_color(color, o->default_val.str, -1, NULL)) < 0) + return ret; + } return !memcmp(color, dst, sizeof(color)); } default: |