libavformat/rdt.c:525: error: Buffer Overrun L1
  Offset: [1, +oo] Size: 1 by call to `avformat_open_input`.

libavformat/rdt.c:525:15: Call
523.     PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
524. 
525.     int ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
                   ^
526.     if (ret < 0) {
527.         av_free(rdt);

libavformat/utils.c:381:1: Parameter `*filename`
  379. }
  380. 
  381. int avformat_open_input(AVFormatContext **ps, const char *filename,
       ^
  382.                         AVInputFormat *fmt, AVDictionary **options)
  383. {

libavformat/utils.c:405:14: Call
  403.     /* Check filename in case an image number is expected. */
  404.     if (s->iformat->flags & AVFMT_NEEDNUMBER) {
  405.         if (!av_filename_number_test(filename)) {
                    ^
  406.             ret = AVERROR(EINVAL);
  407.             goto fail;

libavformat/utils.c:135:1: Parameter `*filename`
    133. }
    134. 
    135. int av_filename_number_test(const char *filename)
         ^
    136. {
    137.     char buf[1024];

libavformat/utils.c:139:13: Call
    137.     char buf[1024];
    138.     return filename &&
    139.            (av_get_frame_filename(buf, sizeof(buf), filename, 1) >= 0);
                     ^
    140. }
    141. 

libavformat/utils.c:2958:1: <Length trace>
2956. }
2957. 
2958. int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
      ^
2959. {
2960.     const char *p;

libavformat/utils.c:2958:1: Parameter `*path`
      2956. }
      2957. 
      2958. int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
            ^
      2959. {
      2960.     const char *p;

libavformat/utils.c:2965:5: Assignment
      2963. 
      2964.     q = buf;
      2965.     p = path;
                ^
      2966.     percentd_found = 0;
      2967.     for (;;) {

libavformat/utils.c:2968:14: Assignment
      2966.     percentd_found = 0;
      2967.     for (;;) {
      2968.         c = *p++;
                         ^
      2969.         if (c == '\0')
      2970.             break;

libavformat/utils.c:2974:35: Array access: Offset: [1, +oo] Size: 1 by call to `avformat_open_input` 
      2972.             do {
      2973.                 nd = 0;
      2974.                 while (av_isdigit(*p))
                                              ^
      2975.                     nd = nd * 10 + *p++ - '0';
      2976.                 c = *p++;

int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
{
    const char *p;
    char *q, buf1[20], c;
    int nd, len, percentd_found;
    q = buf;
    p = path;
    percentd_found = 0;
    for (;;) {
        c = *p++;
        if (c == '\0')
            break;
        if (c == '%') {
            do {
                nd = 0;
                while (av_isdigit(*p))
                    nd = nd * 10 + *p++ - '0';
                c = *p++;
            } while (av_isdigit(c));
            switch (c) {
            case '%':
                goto addchar;
            case 'd':
                if (percentd_found)
                    goto fail;
                percentd_found = 1;
                snprintf(buf1, sizeof(buf1), "%0*d", nd, number);
                len = strlen(buf1);
                if ((q - buf + len) > buf_size - 1)
                    goto fail;
                memcpy(q, buf1, len);
                q += len;
                break;
            default:
                goto fail;
            }
        } else {
addchar:
            if ((q - buf) < buf_size - 1)
                *q++ = c;
        }
    }
    if (!percentd_found)
        goto fail;
    *q = '\0';
    return 0;
fail:
    *q = '\0';
    return -1;
}
['static PayloadContext *\nrdt_new_context (void)\n{\n    PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));\n    int ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);\n    if (ret < 0) {\n        av_free(rdt);\n        return NULL;\n    }\n    return rdt;\n}', 'int avformat_open_input(AVFormatContext **ps, const char *filename,\n                        AVInputFormat *fmt, AVDictionary **options)\n{\n    AVFormatContext *s = *ps;\n    int ret = 0;\n    AVDictionary *tmp = NULL;\n    ID3v2ExtraMeta *id3v2_extra_meta = NULL;\n    if (!s && !(s = avformat_alloc_context()))\n        return AVERROR(ENOMEM);\n    if (fmt)\n        s->iformat = fmt;\n    if (options)\n        av_dict_copy(&tmp, *options, 0);\n    if ((ret = av_opt_set_dict(s, &tmp)) < 0)\n        goto fail;\n    if ((ret = init_input(s, filename, &tmp)) < 0)\n        goto fail;\n    if (s->iformat->flags & AVFMT_NEEDNUMBER) {\n        if (!av_filename_number_test(filename)) {\n            ret = AVERROR(EINVAL);\n            goto fail;\n        }\n    }\n    s->duration = s->start_time = AV_NOPTS_VALUE;\n    av_strlcpy(s->filename, filename ? filename : "", sizeof(s->filename));\n    if (s->iformat->priv_data_size > 0) {\n        if (!(s->priv_data = av_mallocz(s->iformat->priv_data_size))) {\n            ret = AVERROR(ENOMEM);\n            goto fail;\n        }\n        if (s->iformat->priv_class) {\n            *(const AVClass **) s->priv_data = s->iformat->priv_class;\n            av_opt_set_defaults(s->priv_data);\n            if ((ret = av_opt_set_dict(s->priv_data, &tmp)) < 0)\n                goto fail;\n        }\n    }\n    if (s->pb)\n        ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);\n    if (s->iformat->read_header)\n        if ((ret = s->iformat->read_header(s)) < 0)\n            goto fail;\n    if (id3v2_extra_meta &&\n        (ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0)\n        goto fail;\n    ff_id3v2_free_extra_meta(&id3v2_extra_meta);\n    if ((ret = queue_attached_pictures(s)) < 0)\n        goto fail;\n    if (s->pb && !s->data_offset)\n        s->data_offset = avio_tell(s->pb);\n    s->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE;\n    if (options) {\n        av_dict_free(options);\n        *options = tmp;\n    }\n    *ps = s;\n    return 0;\nfail:\n    ff_id3v2_free_extra_meta(&id3v2_extra_meta);\n    av_dict_free(&tmp);\n    if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))\n        avio_close(s->pb);\n    avformat_free_context(s);\n    *ps = NULL;\n    return ret;\n}', 'int av_filename_number_test(const char *filename)\n{\n    char buf[1024];\n    return filename &&\n           (av_get_frame_filename(buf, sizeof(buf), filename, 1) >= 0);\n}', 'int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)\n{\n    const char *p;\n    char *q, buf1[20], c;\n    int nd, len, percentd_found;\n    q = buf;\n    p = path;\n    percentd_found = 0;\n    for (;;) {\n        c = *p++;\n        if (c == \'\\0\')\n            break;\n        if (c == \'%\') {\n            do {\n                nd = 0;\n                while (av_isdigit(*p))\n                    nd = nd * 10 + *p++ - \'0\';\n                c = *p++;\n            } while (av_isdigit(c));\n            switch (c) {\n            case \'%\':\n                goto addchar;\n            case \'d\':\n                if (percentd_found)\n                    goto fail;\n                percentd_found = 1;\n                snprintf(buf1, sizeof(buf1), "%0*d", nd, number);\n                len = strlen(buf1);\n                if ((q - buf + len) > buf_size - 1)\n                    goto fail;\n                memcpy(q, buf1, len);\n                q += len;\n                break;\n            default:\n                goto fail;\n            }\n        } else {\naddchar:\n            if ((q - buf) < buf_size - 1)\n                *q++ = c;\n        }\n    }\n    if (!percentd_found)\n        goto fail;\n    *q = \'\\0\';\n    return 0;\nfail:\n    *q = \'\\0\';\n    return -1;\n}']