libavcodec/truemotion1.c:867: error: Buffer Overrun L2
  Offset: [-oo, max(17, `avctx->priv_data->compression`)] Size: 17.

libavcodec/truemotion1.c:847:1: <Offset trace>
845. 
846. 
847. static int truemotion1_decode_frame(AVCodecContext *avctx,
     ^
848.                                     void *data, int *data_size,
849.                                     const uint8_t *buf, int buf_size)

libavcodec/truemotion1.c:847:1: Parameter `avctx->priv_data->compression`
845. 
846. 
847. static int truemotion1_decode_frame(AVCodecContext *avctx,
     ^
848.                                     void *data, int *data_size,
849.                                     const uint8_t *buf, int buf_size)

libavcodec/truemotion1.c:856:9: Call
854.     s->size = buf_size;
855. 
856.     if (truemotion1_decode_header(s) == -1)
             ^
857.         return -1;
858. 

libavcodec/truemotion1.c:322:1: Parameter `s->compression`
  320. /* Returns the number of bytes consumed from the bytestream. Returns -1 if
  321.  * there was an error while decoding the header */
  322. static int truemotion1_decode_header(TrueMotion1Context *s)
       ^
  323. {
  324.     int i;

libavcodec/truemotion1.c:120:1: <Length trace>
118. 
119. /* { valid for metatype }, algorithm, num of deltas, vert res, horiz res */
120. static comp_types compression_types[17] = {
     ^
121.     { ALGO_NOP,    0, 0, 0 },
122. 

libavcodec/truemotion1.c:120:1: Array declaration
118. 
119. /* { valid for metatype }, algorithm, num of deltas, vert res, horiz res */
120. static comp_types compression_types[17] = {
     ^
121.     { ALGO_NOP,    0, 0, 0 },
122. 

libavcodec/truemotion1.c:867:9: Array access: Offset: [-oo, max(17, avctx->priv_data->compression)] Size: 17
865.     }
866. 
867.     if (compression_types[s->compression].algorithm == ALGO_RGB24H) {
             ^
868.         truemotion1_decode_24bit(s);
869.     } else if (compression_types[s->compression].algorithm != ALGO_NOP) {

static int truemotion1_decode_frame(AVCodecContext *avctx,
                                    void *data, int *data_size,
                                    const uint8_t *buf, int buf_size)
{
    TrueMotion1Context *s = avctx->priv_data;
    s->buf = buf;
    s->size = buf_size;
    if (truemotion1_decode_header(s) == -1)
        return -1;
    s->frame.reference = 1;
    s->frame.buffer_hints = FF_BUFFER_HINTS_VALID |
        FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
    if (avctx->reget_buffer(avctx, &s->frame) < 0) {
        av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
        return -1;
    }
    if (compression_types[s->compression].algorithm == ALGO_RGB24H) {
        truemotion1_decode_24bit(s);
    } else if (compression_types[s->compression].algorithm != ALGO_NOP) {
        truemotion1_decode_16bit(s);
    }
    *data_size = sizeof(AVFrame);
    *(AVFrame*)data = s->frame;
    return buf_size;
}
['static int truemotion1_decode_frame(AVCodecContext *avctx,\n                                    void *data, int *data_size,\n                                    const uint8_t *buf, int buf_size)\n{\n    TrueMotion1Context *s = avctx->priv_data;\n    s->buf = buf;\n    s->size = buf_size;\n    if (truemotion1_decode_header(s) == -1)\n        return -1;\n    s->frame.reference = 1;\n    s->frame.buffer_hints = FF_BUFFER_HINTS_VALID |\n        FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;\n    if (avctx->reget_buffer(avctx, &s->frame) < 0) {\n        av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\\n");\n        return -1;\n    }\n    if (compression_types[s->compression].algorithm == ALGO_RGB24H) {\n        truemotion1_decode_24bit(s);\n    } else if (compression_types[s->compression].algorithm != ALGO_NOP) {\n        truemotion1_decode_16bit(s);\n    }\n    *data_size = sizeof(AVFrame);\n    *(AVFrame*)data = s->frame;\n    return buf_size;\n}', 'static int truemotion1_decode_header(TrueMotion1Context *s)\n{\n    int i;\n    struct frame_header header;\n    uint8_t header_buffer[128];\n    const uint8_t *sel_vector_table;\n    s->mb_change_bits_row_size = ((s->avctx->width >> 2) + 7) >> 3;\n    header.header_size = ((s->buf[0] >> 5) | (s->buf[0] << 3)) & 0x7f;\n    if (s->buf[0] < 0x10)\n    {\n        av_log(s->avctx, AV_LOG_ERROR, "invalid header size (%d)\\n", s->buf[0]);\n        return -1;\n    }\n    memset(header_buffer, 0, 128);\n    for (i = 1; i < header.header_size; i++)\n        header_buffer[i - 1] = s->buf[i] ^ s->buf[i + 1];\n    header.compression = header_buffer[0];\n    header.deltaset = header_buffer[1];\n    header.vectable = header_buffer[2];\n    header.ysize = AV_RL16(&header_buffer[3]);\n    header.xsize = AV_RL16(&header_buffer[5]);\n    header.checksum = AV_RL16(&header_buffer[7]);\n    header.version = header_buffer[9];\n    header.header_type = header_buffer[10];\n    header.flags = header_buffer[11];\n    header.control = header_buffer[12];\n    if (header.version >= 2)\n    {\n        if (header.header_type > 3)\n        {\n            av_log(s->avctx, AV_LOG_ERROR, "invalid header type (%d)\\n", header.header_type);\n            return -1;\n        } else if ((header.header_type == 2) || (header.header_type == 3)) {\n            s->flags = header.flags;\n            if (!(s->flags & FLAG_INTERFRAME))\n                s->flags |= FLAG_KEYFRAME;\n        } else\n            s->flags = FLAG_KEYFRAME;\n    } else\n        s->flags = FLAG_KEYFRAME;\n    if (s->flags & FLAG_SPRITE) {\n        av_log(s->avctx, AV_LOG_INFO, "SPRITE frame found, please report the sample to the developers\\n");\n#if 0\n        s->w = header.width;\n        s->h = header.height;\n        s->x = header.xoffset;\n        s->y = header.yoffset;\n#else\n        return -1;\n#endif\n    } else {\n        s->w = header.xsize;\n        s->h = header.ysize;\n        if (header.header_type < 2) {\n            if ((s->w < 213) && (s->h >= 176))\n            {\n                s->flags |= FLAG_INTERPOLATED;\n                av_log(s->avctx, AV_LOG_INFO, "INTERPOLATION selected, please report the sample to the developers\\n");\n            }\n        }\n    }\n    if (header.compression > 17) {\n        av_log(s->avctx, AV_LOG_ERROR, "invalid compression type (%d)\\n", header.compression);\n        return -1;\n    }\n    if ((header.deltaset != s->last_deltaset) ||\n        (header.vectable != s->last_vectable))\n        select_delta_tables(s, header.deltaset);\n    if ((header.compression & 1) && header.header_type)\n        sel_vector_table = pc_tbl2;\n    else {\n        if (header.vectable < 4)\n            sel_vector_table = tables[header.vectable - 1];\n        else {\n            av_log(s->avctx, AV_LOG_ERROR, "invalid vector table id (%d)\\n", header.vectable);\n            return -1;\n        }\n    }\n    if (compression_types[header.compression].algorithm == ALGO_RGB24H)\n        s->avctx->pix_fmt = PIX_FMT_RGB32;\n    else\n        s->avctx->pix_fmt = PIX_FMT_RGB555;\n    if ((header.deltaset != s->last_deltaset) || (header.vectable != s->last_vectable))\n    {\n        if (compression_types[header.compression].algorithm == ALGO_RGB24H)\n            gen_vector_table24(s, sel_vector_table);\n        else\n        if (s->avctx->pix_fmt == PIX_FMT_RGB555)\n            gen_vector_table15(s, sel_vector_table);\n        else\n            gen_vector_table16(s, sel_vector_table);\n    }\n    s->mb_change_bits = s->buf + header.header_size;\n    if (s->flags & FLAG_KEYFRAME) {\n        s->index_stream = s->mb_change_bits;\n    } else {\n        s->index_stream = s->mb_change_bits +\n            (s->mb_change_bits_row_size * (s->avctx->height >> 2));\n    }\n    s->index_stream_size = s->size - (s->index_stream - s->buf);\n    s->last_deltaset = header.deltaset;\n    s->last_vectable = header.vectable;\n    s->compression = header.compression;\n    s->block_width = compression_types[header.compression].block_width;\n    s->block_height = compression_types[header.compression].block_height;\n    s->block_type = compression_types[header.compression].block_type;\n    if (s->avctx->debug & FF_DEBUG_PICT_INFO)\n        av_log(s->avctx, AV_LOG_INFO, "tables: %d / %d c:%d %dx%d t:%d %s%s%s%s\\n",\n            s->last_deltaset, s->last_vectable, s->compression, s->block_width,\n            s->block_height, s->block_type,\n            s->flags & FLAG_KEYFRAME ? " KEY" : "",\n            s->flags & FLAG_INTERFRAME ? " INTER" : "",\n            s->flags & FLAG_SPRITE ? " SPRITE" : "",\n            s->flags & FLAG_INTERPOLATED ? " INTERPOL" : "");\n    return header.header_size;\n}']