]> git.sesse.net Git - ffmpeg/commitdiff
avutil/opt: Check av_parse_color() return value
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Dec 2014 01:46:25 +0000 (02:46 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Dec 2014 01:46:25 +0000 (02:46 +0100)
Fixes: CID1257007
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opt.c

index d873bd205e2f30f190c7cf23df52397aae01a81b..e43b5d83634cc7f62f12a7446e13a84ff6377414 100644 (file)
@@ -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: