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

libavformat/rdt.c:529:12: Call
527. static av_cold int rdt_init(AVFormatContext *s, int st_index, PayloadContext *rdt)
528. {
529.     return avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
                ^
530. }
531. 

libavformat/utils.c:247:1: Parameter `*filename`
  245. }
  246. 
  247. int avformat_open_input(AVFormatContext **ps, const char *filename,
       ^
  248.                         AVInputFormat *fmt, AVDictionary **options)
  249. {

libavformat/utils.c:271:14: Call
  269.     /* Check filename in case an image number is expected. */
  270.     if (s->iformat->flags & AVFMT_NEEDNUMBER) {
  271.         if (!av_filename_number_test(filename)) {
                    ^
  272.             ret = AVERROR(EINVAL);
  273.             goto fail;

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

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

libavformat/utils.c:2648:1: <Length trace>
2646. }
2647. 
2648. int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
      ^
2649. {
2650.     const char *p;

libavformat/utils.c:2648:1: Parameter `*path`
      2646. }
      2647. 
      2648. int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
            ^
      2649. {
      2650.     const char *p;

libavformat/utils.c:2655:5: Assignment
      2653. 
      2654.     q = buf;
      2655.     p = path;
                ^
      2656.     percentd_found = 0;
      2657.     for (;;) {

libavformat/utils.c:2658:14: Assignment
      2656.     percentd_found = 0;
      2657.     for (;;) {
      2658.         c = *p++;
                         ^
      2659.         if (c == '\0')
      2660.             break;

libavformat/utils.c:2664:35: Array access: Offset: [1, +oo] Size: 1 by call to `avformat_open_input` 
      2662.             do {
      2663.                 nd = 0;
      2664.                 while (av_isdigit(*p))
                                              ^
      2665.                     nd = nd * 10 + *p++ - '0';
      2666.                 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 av_cold int rdt_init(AVFormatContext *s, int st_index, PayloadContext *rdt)\n{\n    return avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);\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->internal->data_offset)\n        s->internal->data_offset = avio_tell(s->pb);\n    s->internal->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}']