libavformat/rtpdec_asf.c:112: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `avformat_close_input`.

libavformat/rtpdec_asf.c:105:9: Call
103.         int len = strlen(p) * 6 / 8;
104.         char *buf = av_mallocz(len);
105.         av_base64_decode(buf, p, len);
             ^
106. 
107.         if (rtp_asf_fix_header(buf, len) < 0)

libavutil/base64.c:45:1: Parameter `out->strlen`
  43. };
  44. 
  45. int av_base64_decode(uint8_t *out, const char *in, int out_size)
      ^
  46. {
  47.     int i;

libavformat/rtpdec_asf.c:112:13: Call
110.         init_packetizer(&pb, buf, len);
111.         if (rt->asf_ctx) {
112.             avformat_close_input(&rt->asf_ctx);
                 ^
113.         }
114.         if (!(rt->asf_ctx = avformat_alloc_context()))

libavformat/utils.c:2641:1: Parameter `(*ps)->nb_programs`
  2639. }
  2640. 
  2641. void avformat_close_input(AVFormatContext **ps)
        ^
  2642. {
  2643.     AVFormatContext *s = *ps;

libavformat/utils.c:2656:5: Call
  2654.             s->iformat->read_close(s);
  2655. 
  2656.     avformat_free_context(s);
            ^
  2657. 
  2658.     *ps = NULL;

libavformat/utils.c:2596:1: <LHS trace>
2594. }
2595. 
2596. void avformat_free_context(AVFormatContext *s)
      ^
2597. {
2598.     int i;

libavformat/utils.c:2596:1: Parameter `s->nb_programs`
    2594. }
    2595. 
    2596. void avformat_free_context(AVFormatContext *s)
          ^
    2597. {
    2598.     int i;

libavformat/utils.c:2623:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_close_input` 
    2621.         av_free(st);
    2622.     }
    2623.     for (i = s->nb_programs - 1; i >= 0; i--) {
                   ^
    2624.         av_dict_free(&s->programs[i]->metadata);
    2625.         av_freep(&s->programs[i]->stream_index);

void avformat_free_context(AVFormatContext *s)
{
    int i;
    AVStream *st;
    av_opt_free(s);
    if (s->iformat && s->iformat->priv_class && s->priv_data)
        av_opt_free(s->priv_data);
    for (i = 0; i < s->nb_streams; i++) {
        st = s->streams[i];
        if (st->parser) {
            av_parser_close(st->parser);
        }
        if (st->attached_pic.data)
            av_free_packet(&st->attached_pic);
        av_dict_free(&st->metadata);
        av_freep(&st->probe_data.buf);
        av_free(st->index_entries);
        av_free(st->codec->extradata);
        av_free(st->codec->subtitle_header);
        av_free(st->codec);
        av_free(st->priv_data);
        av_free(st->info);
        av_free(st);
    }
    for (i = s->nb_programs - 1; i >= 0; i--) {
        av_dict_free(&s->programs[i]->metadata);
        av_freep(&s->programs[i]->stream_index);
        av_freep(&s->programs[i]);
    }
    av_freep(&s->programs);
    av_freep(&s->priv_data);
    while (s->nb_chapters--) {
        av_dict_free(&s->chapters[s->nb_chapters]->metadata);
        av_free(s->chapters[s->nb_chapters]);
    }
    av_freep(&s->chapters);
    av_dict_free(&s->metadata);
    av_freep(&s->streams);
    av_freep(&s->internal);
    av_free(s);
}
['int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)\n{\n    int ret = 0;\n    if (av_strstart(p, "pgmpu:data:application/vnd.ms.wms-hdr.asfv1;base64,", &p)) {\n        AVIOContext pb;\n        RTSPState *rt = s->priv_data;\n        AVDictionary *opts = NULL;\n        int len = strlen(p) * 6 / 8;\n        char *buf = av_mallocz(len);\n        av_base64_decode(buf, p, len);\n        if (rtp_asf_fix_header(buf, len) < 0)\n            av_log(s, AV_LOG_ERROR,\n                   "Failed to fix invalid RTSP-MS/ASF min_pktsize\\n");\n        init_packetizer(&pb, buf, len);\n        if (rt->asf_ctx) {\n            avformat_close_input(&rt->asf_ctx);\n        }\n        if (!(rt->asf_ctx = avformat_alloc_context()))\n            return AVERROR(ENOMEM);\n        rt->asf_ctx->pb      = &pb;\n        av_dict_set(&opts, "no_resync_search", "1", 0);\n        ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, &opts);\n        av_dict_free(&opts);\n        if (ret < 0)\n            return ret;\n        av_dict_copy(&s->metadata, rt->asf_ctx->metadata, 0);\n        rt->asf_pb_pos = avio_tell(&pb);\n        av_free(buf);\n        rt->asf_ctx->pb = NULL;\n    }\n    return ret;\n}', "int av_base64_decode(uint8_t *out, const char *in, int out_size)\n{\n    int i;\n    unsigned v = 0;\n    uint8_t *dst = out;\n    for (i = 0; in[i] && in[i] != '='; i++) {\n        unsigned int index= in[i]-43;\n        if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)\n            return -1;\n        v = (v << 6) + map2[index];\n        if (i & 3) {\n            if (dst - out < out_size) {\n                *dst++ = v >> (6 - 2 * (i & 3));\n            }\n        }\n    }\n    return dst - out;\n}", 'void avformat_close_input(AVFormatContext **ps)\n{\n    AVFormatContext *s = *ps;\n    AVIOContext *pb    = s->pb;\n    if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||\n        (s->flags & AVFMT_FLAG_CUSTOM_IO))\n        pb = NULL;\n    flush_packet_queue(s);\n    if (s->iformat)\n        if (s->iformat->read_close)\n            s->iformat->read_close(s);\n    avformat_free_context(s);\n    *ps = NULL;\n    avio_close(pb);\n}', 'void avformat_free_context(AVFormatContext *s)\n{\n    int i;\n    AVStream *st;\n    av_opt_free(s);\n    if (s->iformat && s->iformat->priv_class && s->priv_data)\n        av_opt_free(s->priv_data);\n    for (i = 0; i < s->nb_streams; i++) {\n        st = s->streams[i];\n        if (st->parser) {\n            av_parser_close(st->parser);\n        }\n        if (st->attached_pic.data)\n            av_free_packet(&st->attached_pic);\n        av_dict_free(&st->metadata);\n        av_freep(&st->probe_data.buf);\n        av_free(st->index_entries);\n        av_free(st->codec->extradata);\n        av_free(st->codec->subtitle_header);\n        av_free(st->codec);\n        av_free(st->priv_data);\n        av_free(st->info);\n        av_free(st);\n    }\n    for (i = s->nb_programs - 1; i >= 0; i--) {\n        av_dict_free(&s->programs[i]->metadata);\n        av_freep(&s->programs[i]->stream_index);\n        av_freep(&s->programs[i]);\n    }\n    av_freep(&s->programs);\n    av_freep(&s->priv_data);\n    while (s->nb_chapters--) {\n        av_dict_free(&s->chapters[s->nb_chapters]->metadata);\n        av_free(s->chapters[s->nb_chapters]);\n    }\n    av_freep(&s->chapters);\n    av_dict_free(&s->metadata);\n    av_freep(&s->streams);\n    av_freep(&s->internal);\n    av_free(s);\n}']