cmdutils.c:460: error: Buffer Overrun L3
  Offset: [-1, 0] Size: [0, 2147483631] by call to `av_dict_set`.

cmdutils.c:456:14: Call
454.     av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1));
455. 
456.     if ((o = av_opt_find(&cc, opt_stripped, NULL, 0,
                  ^
457.                          AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) ||
458.         ((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&

libavutil/opt.c:700:1: Parameter `*obj`
  698. }
  699. 
  700. const AVOption *av_opt_find(void *obj, const char *name, const char *unit,
       ^
  701.                             int opt_flags, int search_flags)
  702. {

libavutil/opt.c:703:12: Call
  701.                             int opt_flags, int search_flags)
  702. {
  703.     return av_opt_find2(obj, name, unit, opt_flags, search_flags, NULL);
                  ^
  704. }
  705. 

libavutil/opt.c:706:1: Parameter `**target_obj`
    704. }
    705. 
    706. const AVOption *av_opt_find2(void *obj, const char *name, const char *unit,
         ^
    707.                              int opt_flags, int search_flags, void **target_obj)
    708. {

cmdutils.c:460:9: Call
458.         ((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&
459.          (o = av_opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ))))
460.         av_dict_set(&codec_opts, opt, arg, FLAGS);
             ^
461.     else if ((o = av_opt_find(&fc, opt, NULL, 0,
462.                               AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))

libavutil/dict.c:68:1: <Offset trace>
66. }
67. 
68. int av_dict_set(AVDictionary **pm, const char *key, const char *value,
    ^
69.                 int flags)
70. {

libavutil/dict.c:68:1: Parameter `(*pm)->count`
  66. }
  67. 
  68. int av_dict_set(AVDictionary **pm, const char *key, const char *value,
      ^
  69.                 int flags)
  70. {

libavutil/dict.c:72:30: Call
  70. {
  71.     AVDictionary *m = *pm;
  72.     AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags);
                                   ^
  73.     char *oldval = NULL;
  74.     int allocated = !!m;

libavutil/dict.c:38:1: Parameter `m->count`
    36. }
    37. 
    38. AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
        ^
    39.                                const AVDictionaryEntry *prev, int flags)
    40. {

libavutil/dict.c:68:1: <Length trace>
66. }
67. 
68. int av_dict_set(AVDictionary **pm, const char *key, const char *value,
    ^
69.                 int flags)
70. {

libavutil/dict.c:68:1: Parameter `*(*pm)->elems`
  66. }
  67. 
  68. int av_dict_set(AVDictionary **pm, const char *key, const char *value,
      ^
  69.                 int flags)
  70. {

libavutil/dict.c:105:13: Array access: Offset: [-1, 0] Size: [0, 2147483631] by call to `av_dict_set` 
  103.     if (value) {
  104.         if (flags & AV_DICT_DONT_STRDUP_KEY)
  105.             m->elems[m->count].key = key;
                   ^
  106.         else
  107.             m->elems[m->count].key = av_strdup(key);

int av_dict_set(AVDictionary **pm, const char *key, const char *value,
                int flags)
{
    AVDictionary *m = *pm;
    AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags);
    char *oldval = NULL;
    int allocated = !!m;
    if (!m)
        m = *pm = av_mallocz(sizeof(*m));
    if (!m)
        return AVERROR(ENOMEM);
    if (tag) {
        if (flags & AV_DICT_DONT_OVERWRITE) {
            if (flags & AV_DICT_DONT_STRDUP_KEY) av_free(key);
            if (flags & AV_DICT_DONT_STRDUP_VAL) av_free(value);
            return 0;
        }
        if (flags & AV_DICT_APPEND)
            oldval = tag->value;
        else
            av_free(tag->value);
        av_free(tag->key);
        *tag = m->elems[--m->count];
    } else {
        int ret = av_reallocp_array(&m->elems,
                                    m->count + 1, sizeof(*m->elems));
        if (ret < 0) {
            if (allocated)
                av_freep(pm);
            return ret;
        }
    }
    if (value) {
        if (flags & AV_DICT_DONT_STRDUP_KEY)
            m->elems[m->count].key = key;
        else
            m->elems[m->count].key = av_strdup(key);
        if (flags & AV_DICT_DONT_STRDUP_VAL) {
            m->elems[m->count].value = value;
        } else if (oldval && flags & AV_DICT_APPEND) {
            int len = strlen(oldval) + strlen(value) + 1;
            if (!(oldval = av_realloc(oldval, len)))
                return AVERROR(ENOMEM);
            av_strlcat(oldval, value, len);
            m->elems[m->count].value = oldval;
        } else
            m->elems[m->count].value = av_strdup(value);
        m->count++;
    }
    if (!m->count) {
        av_free(m->elems);
        av_freep(pm);
    }
    return 0;
}
['int opt_default(void *optctx, const char *opt, const char *arg)\n{\n    const AVOption *o;\n    char opt_stripped[128];\n    const char *p;\n    const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class();\n#if CONFIG_AVRESAMPLE\n    const AVClass *rc = avresample_get_class();\n#endif\n#if CONFIG_SWSCALE\n    const AVClass *sc = sws_get_class();\n#endif\n    if (!(p = strchr(opt, \':\')))\n        p = opt + strlen(opt);\n    av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1));\n    if ((o = av_opt_find(&cc, opt_stripped, NULL, 0,\n                         AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) ||\n        ((opt[0] == \'v\' || opt[0] == \'a\' || opt[0] == \'s\') &&\n         (o = av_opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ))))\n        av_dict_set(&codec_opts, opt, arg, FLAGS);\n    else if ((o = av_opt_find(&fc, opt, NULL, 0,\n                              AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))\n        av_dict_set(&format_opts, opt, arg, FLAGS);\n#if CONFIG_AVRESAMPLE\n    else if ((o = av_opt_find(&rc, opt, NULL, 0,\n                              AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))\n        av_dict_set(&resample_opts, opt, arg, FLAGS);\n#endif\n#if CONFIG_SWSCALE\n    else if ((o = av_opt_find(&sc, opt, NULL, 0,\n                              AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {\n        int ret = av_opt_set(sws_opts, opt, arg, 0);\n        if (ret < 0) {\n            av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\\n", opt);\n            return ret;\n        }\n    }\n#endif\n    if (o)\n        return 0;\n    return AVERROR_OPTION_NOT_FOUND;\n}', 'const AVOption *av_opt_find(void *obj, const char *name, const char *unit,\n                            int opt_flags, int search_flags)\n{\n    return av_opt_find2(obj, name, unit, opt_flags, search_flags, NULL);\n}', 'const AVOption *av_opt_find2(void *obj, const char *name, const char *unit,\n                             int opt_flags, int search_flags, void **target_obj)\n{\n    const AVClass  *c = *(AVClass**)obj;\n    const AVOption *o = NULL;\n    if (!c)\n        return NULL;\n    if (search_flags & AV_OPT_SEARCH_CHILDREN) {\n        if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) {\n            const AVClass *child = NULL;\n            while (child = av_opt_child_class_next(c, child))\n                if (o = av_opt_find2(&child, name, unit, opt_flags, search_flags, NULL))\n                    return o;\n        } else {\n            void *child = NULL;\n            while (child = av_opt_child_next(obj, child))\n                if (o = av_opt_find2(child, name, unit, opt_flags, search_flags, target_obj))\n                    return o;\n        }\n    }\n    while (o = av_opt_next(obj, o)) {\n        if (!strcmp(o->name, name) && (o->flags & opt_flags) == opt_flags &&\n            ((!unit && o->type != AV_OPT_TYPE_CONST) ||\n             (unit  && o->unit && !strcmp(o->unit, unit)))) {\n            if (target_obj) {\n                if (!(search_flags & AV_OPT_SEARCH_FAKE_OBJ))\n                    *target_obj = obj;\n                else\n                    *target_obj = NULL;\n            }\n            return o;\n        }\n    }\n    return NULL;\n}', 'int av_dict_set(AVDictionary **pm, const char *key, const char *value,\n                int flags)\n{\n    AVDictionary *m = *pm;\n    AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags);\n    char *oldval = NULL;\n    int allocated = !!m;\n    if (!m)\n        m = *pm = av_mallocz(sizeof(*m));\n    if (!m)\n        return AVERROR(ENOMEM);\n    if (tag) {\n        if (flags & AV_DICT_DONT_OVERWRITE) {\n            if (flags & AV_DICT_DONT_STRDUP_KEY) av_free(key);\n            if (flags & AV_DICT_DONT_STRDUP_VAL) av_free(value);\n            return 0;\n        }\n        if (flags & AV_DICT_APPEND)\n            oldval = tag->value;\n        else\n            av_free(tag->value);\n        av_free(tag->key);\n        *tag = m->elems[--m->count];\n    } else {\n        int ret = av_reallocp_array(&m->elems,\n                                    m->count + 1, sizeof(*m->elems));\n        if (ret < 0) {\n            if (allocated)\n                av_freep(pm);\n            return ret;\n        }\n    }\n    if (value) {\n        if (flags & AV_DICT_DONT_STRDUP_KEY)\n            m->elems[m->count].key = key;\n        else\n            m->elems[m->count].key = av_strdup(key);\n        if (flags & AV_DICT_DONT_STRDUP_VAL) {\n            m->elems[m->count].value = value;\n        } else if (oldval && flags & AV_DICT_APPEND) {\n            int len = strlen(oldval) + strlen(value) + 1;\n            if (!(oldval = av_realloc(oldval, len)))\n                return AVERROR(ENOMEM);\n            av_strlcat(oldval, value, len);\n            m->elems[m->count].value = oldval;\n        } else\n            m->elems[m->count].value = av_strdup(value);\n        m->count++;\n    }\n    if (!m->count) {\n        av_free(m->elems);\n        av_freep(pm);\n    }\n    return 0;\n}', 'AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,\n                               const AVDictionaryEntry *prev, int flags)\n{\n    unsigned int i, j;\n    if (!m)\n        return NULL;\n    if (prev)\n        i = prev - m->elems + 1;\n    else\n        i = 0;\n    for (; i < m->count; i++) {\n        const char *s = m->elems[i].key;\n        if (flags & AV_DICT_MATCH_CASE)\n            for (j = 0; s[j] == key[j] && key[j]; j++)\n                ;\n        else\n            for (j = 0; av_toupper(s[j]) == av_toupper(key[j]) && key[j]; j++)\n                ;\n        if (key[j])\n            continue;\n        if (s[j] && !(flags & AV_DICT_IGNORE_SUFFIX))\n            continue;\n        return &m->elems[i];\n    }\n    return NULL;\n}']