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

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

libavformat/utils.c:501:1: Parameter `*filename`
  499. }
  500. 
  501. int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)
       ^
  502. {
  503.     AVFormatContext *s = *ps;

libavformat/utils.c:523:14: Call
  521.     /* check filename in case an image number is expected */
  522.     if (s->iformat->flags & AVFMT_NEEDNUMBER) {
  523.         if (!av_filename_number_test(filename)) {
                    ^
  524.             ret = AVERROR(EINVAL);
  525.             goto fail;

libavformat/utils.c:303:1: Parameter `*filename`
    301. 
    302. 
    303. int av_filename_number_test(const char *filename)
         ^
    304. {
    305.     char buf[1024];

libavformat/utils.c:306:25: Call
    304. {
    305.     char buf[1024];
    306.     return filename && (av_get_frame_filename(buf, sizeof(buf), filename, 1)>=0);
                                 ^
    307. }
    308. 

libavformat/utils.c:3341:1: <Length trace>
3339. }
3340. 
3341. int av_get_frame_filename(char *buf, int buf_size,
      ^
3342.                           const char *path, int number)
3343. {

libavformat/utils.c:3341:1: Parameter `*path`
      3339. }
      3340. 
      3341. int av_get_frame_filename(char *buf, int buf_size,
            ^
      3342.                           const char *path, int number)
      3343. {

libavformat/utils.c:3349:5: Assignment
      3347. 
      3348.     q = buf;
      3349.     p = path;
                ^
      3350.     percentd_found = 0;
      3351.     for(;;) {

libavformat/utils.c:3352:14: Assignment
      3350.     percentd_found = 0;
      3351.     for(;;) {
      3352.         c = *p++;
                         ^
      3353.         if (c == '\0')
      3354.             break;

libavformat/utils.c:3358:24: Array access: Offset: [1, +oo] Size: 1 by call to `avformat_open_input` 
      3356.             do {
      3357.                 nd = 0;
      3358.                 while (isdigit(*p)) {
                                   ^
      3359.                     nd = nd * 10 + *p++ - '0';
      3360.                 }

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 (isdigit(*p)) {
                    nd = nd * 10 + *p++ - '0';
                }
                c = *p++;
            } while (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, AVInputFormat *fmt, AVDictionary **options)\n{\n    AVFormatContext *s = *ps;\n    int ret = 0;\n    AVDictionary *tmp = 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, 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);\n    if (s->iformat->read_header)\n        if ((ret = s->iformat->read_header(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    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 && (av_get_frame_filename(buf, sizeof(buf), filename, 1)>=0);\n}', 'int av_get_frame_filename(char *buf, int buf_size,\n                          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 (isdigit(*p)) {\n                    nd = nd * 10 + *p++ - \'0\';\n                }\n                c = *p++;\n            } while (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 {\n        addchar:\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;\n fail:\n    *q = \'\\0\';\n    return -1;\n}']