avprobe.c:642: error: Integer Overflow L2
  ([1, 128] - [0, 127]):unsigned64 by call to `av_get_codec_tag_string`.

avprobe.c:642:5: Call
640. 
641.     /* print AVI/FourCC tag */
642.     av_get_codec_tag_string(val_str, sizeof(val_str), par->codec_tag);
         ^
643.     probe_str("codec_tag_string", val_str);
644.     probe_str("codec_tag", tag_string(val_str, sizeof(val_str),

libavcodec/utils.c:1751:1: <LHS trace>
1749. }
1750. 
1751. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
      ^
1752. {
1753.     int i, len, ret = 0;

libavcodec/utils.c:1751:1: Parameter `buf_size`
  1749. }
  1750. 
  1751. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
        ^
  1752. {
  1753.     int i, len, ret = 0;

libavcodec/utils.c:1751:1: <RHS trace>
1749. }
1750. 
1751. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
      ^
1752. {
1753.     int i, len, ret = 0;

libavcodec/utils.c:1751:1: Parameter `buf_size`
  1749. }
  1750. 
  1751. size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
        ^
  1752. {
  1753.     int i, len, ret = 0;

libavcodec/utils.c:1764:23: Binary operation: ([1, 128] - [0, 127]):unsigned64 by call to `av_get_codec_tag_string` 
  1762.                        TAG_PRINT(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);
  1763.         buf        += len;
  1764.         buf_size    = buf_size > len ? buf_size - len : 0;
                              ^
  1765.         ret        += len;
  1766.         codec_tag >>= 8;

size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
{
    int i, len, ret = 0;
#define TAG_PRINT(x)                                              \
    (((x) >= '0' && (x) <= '9') ||                                \
     ((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') ||  \
     ((x) == '.' || (x) == ' '))
    for (i = 0; i < 4; i++) {
        len = snprintf(buf, buf_size,
                       TAG_PRINT(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);
        buf        += len;
        buf_size    = buf_size > len ? buf_size - len : 0;
        ret        += len;
        codec_tag >>= 8;
    }
    return ret;
}
['static void show_stream(InputFile *ifile, InputStream *ist)\n{\n    AVFormatContext *fmt_ctx = ifile->fmt_ctx;\n    AVStream *stream = ist->st;\n    AVCodecParameters *par;\n    AVCodecContext *dec_ctx;\n    const AVCodecDescriptor *codec_desc;\n    const char *profile;\n    char val_str[128];\n    AVRational display_aspect_ratio, *sar = NULL;\n    const AVPixFmtDescriptor *desc;\n    probe_object_header("stream");\n    probe_int("index", stream->index);\n    par     = stream->codecpar;\n    dec_ctx = ist->dec_ctx;\n    codec_desc = avcodec_descriptor_get(par->codec_id);\n    if (codec_desc) {\n        probe_str("codec_name", codec_desc->name);\n        probe_str("codec_long_name", codec_desc->long_name);\n    } else {\n        probe_str("codec_name", "unknown");\n    }\n    probe_str("codec_type", media_type_string(par->codec_type));\n    av_get_codec_tag_string(val_str, sizeof(val_str), par->codec_tag);\n    probe_str("codec_tag_string", val_str);\n    probe_str("codec_tag", tag_string(val_str, sizeof(val_str),\n                                      par->codec_tag));\n    profile = avcodec_profile_name(par->codec_id, par->profile);\n    if (profile)\n        probe_str("profile", profile);\n    switch (par->codec_type) {\n    case AVMEDIA_TYPE_VIDEO:\n        probe_int("width",  par->width);\n        probe_int("height", par->height);\n        if (dec_ctx) {\n            probe_int("coded_width",  dec_ctx->coded_width);\n            probe_int("coded_height", dec_ctx->coded_height);\n            probe_int("has_b_frames", dec_ctx->has_b_frames);\n        }\n        if (dec_ctx && dec_ctx->sample_aspect_ratio.num)\n            sar = &dec_ctx->sample_aspect_ratio;\n        else if (par->sample_aspect_ratio.num)\n            sar = &par->sample_aspect_ratio;\n        else if (stream->sample_aspect_ratio.num)\n            sar = &stream->sample_aspect_ratio;\n        if (sar) {\n            probe_str("sample_aspect_ratio",\n                      rational_string(val_str, sizeof(val_str), ":", sar));\n            av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,\n                      par->width  * sar->num, par->height * sar->den,\n                      1024*1024);\n            probe_str("display_aspect_ratio",\n                      rational_string(val_str, sizeof(val_str), ":",\n                      &display_aspect_ratio));\n        }\n        desc = av_pix_fmt_desc_get(par->format);\n        probe_str("pix_fmt", desc ? desc->name : "unknown");\n        probe_int("level", par->level);\n        probe_str("color_range", av_color_range_name    (par->color_range));\n        probe_str("color_space", av_color_space_name    (par->color_space));\n        probe_str("color_trc",   av_color_transfer_name (par->color_trc));\n        probe_str("color_pri",   av_color_primaries_name(par->color_primaries));\n        probe_str("chroma_loc", av_chroma_location_name (par->chroma_location));\n        break;\n    case AVMEDIA_TYPE_AUDIO:\n        probe_str("sample_rate",\n                  value_string(val_str, sizeof(val_str),\n                               par->sample_rate,\n                               unit_hertz_str));\n        probe_int("channels", par->channels);\n        probe_int("bits_per_sample",\n                  av_get_bits_per_sample(par->codec_id));\n        break;\n    }\n    if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS)\n        probe_int("id", stream->id);\n    probe_str("avg_frame_rate",\n              rational_string(val_str, sizeof(val_str), "/",\n              &stream->avg_frame_rate));\n    if (par->bit_rate)\n        probe_str("bit_rate",\n                  value_string(val_str, sizeof(val_str),\n                               par->bit_rate, unit_bit_per_second_str));\n    probe_str("time_base",\n              rational_string(val_str, sizeof(val_str), "/",\n              &stream->time_base));\n    probe_str("start_time",\n              time_value_string(val_str, sizeof(val_str),\n                                stream->start_time, &stream->time_base));\n    probe_str("duration",\n              time_value_string(val_str, sizeof(val_str),\n                                stream->duration, &stream->time_base));\n    if (stream->nb_frames)\n        probe_int("nb_frames", stream->nb_frames);\n    probe_dict(stream->metadata, "tags");\n    if (stream->nb_side_data) {\n        int i, j;\n        probe_object_header("sidedata");\n        for (i = 0; i < stream->nb_side_data; i++) {\n            const AVPacketSideData* sd = &stream->side_data[i];\n            switch (sd->type) {\n            case AV_PKT_DATA_DISPLAYMATRIX:\n                probe_object_header("displaymatrix");\n                probe_array_header("matrix", 1);\n                for (j = 0; j < 9; j++)\n                    probe_int(NULL, ((int32_t *)sd->data)[j]);\n                probe_array_footer("matrix", 1);\n                probe_int("rotation",\n                          av_display_rotation_get((int32_t *)sd->data));\n                probe_object_footer("displaymatrix");\n                break;\n            }\n        }\n        probe_object_footer("sidedata");\n    }\n    probe_object_footer("stream");\n}', 'size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)\n{\n    int i, len, ret = 0;\n#define TAG_PRINT(x)                                              \\\n    (((x) >= \'0\' && (x) <= \'9\') ||                                \\\n     ((x) >= \'a\' && (x) <= \'z\') || ((x) >= \'A\' && (x) <= \'Z\') ||  \\\n     ((x) == \'.\' || (x) == \' \'))\n    for (i = 0; i < 4; i++) {\n        len = snprintf(buf, buf_size,\n                       TAG_PRINT(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);\n        buf        += len;\n        buf_size    = buf_size > len ? buf_size - len : 0;\n        ret        += len;\n        codec_tag >>= 8;\n    }\n    return ret;\n}']