libavcodec/kgv1dec.c:92: error: Buffer Overrun L2
  Offset: [0, 7] Size: 7.

libavcodec/kgv1dec.c:37:1: <Offset trace>
35. } KgvContext;
36. 
37. static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
    ^
38. {
39.     const uint8_t *buf = avpkt->data;

libavcodec/kgv1dec.c:37:1: Parameter `avpkt->data->l`
35. } KgvContext;
36. 
37. static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
    ^
38. {
39.     const uint8_t *buf = avpkt->data;

libavcodec/kgv1dec.c:76:9: Assignment
74. 
75.     while (outcnt < maxcnt && buf_end - 2 > buf) {
76.         int code = AV_RL16(buf);
            ^
77.         buf += 2;
78. 

libavcodec/kgv1dec.c:87:17: Assignment
85.             if ((code & 0x6000) == 0x6000) {
86.                 // copy from previous frame
87.                 int oidx = (code >> 10) & 7;
                    ^
88.                 int start;
89. 

libavcodec/kgv1dec.c:37:1: <Length trace>
35. } KgvContext;
36. 
37. static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
    ^
38. {
39.     const uint8_t *buf = avpkt->data;

libavcodec/kgv1dec.c:37:1: Array declaration
35. } KgvContext;
36. 
37. static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
    ^
38. {
39.     const uint8_t *buf = avpkt->data;

libavcodec/kgv1dec.c:92:21: Array access: Offset: [0, 7] Size: 7
90.                 count = (code & 0x3FF) + 3;
91. 
92.                 if (offsets[oidx] < 0) {
                        ^
93.                     if (buf_end - 3 < buf)
94.                         break;
