libavcore/imgutils.c:88: error: Buffer Overrun L2
  Offset: [1, 4] Size: 4.

libavcore/imgutils.c:88:10: <Offset trace>
86. 
87.     total_size = size[0];
88.     for (i = 1; has_plane[i] && i < 4; i++) {
             ^
89.         int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
90.         data[i] = data[i-1] + size[i-1];

libavcore/imgutils.c:88:10: Assignment
86. 
87.     total_size = size[0];
88.     for (i = 1; has_plane[i] && i < 4; i++) {
             ^
89.         int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
90.         data[i] = data[i-1] + size[i-1];

libavcore/imgutils.c:62:1: <Length trace>
60. }
61. 
62. int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
    ^
63.                            uint8_t *ptr, const int linesizes[4])
64. {

libavcore/imgutils.c:62:1: Array declaration
60. }
61. 
62. int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
    ^
63.                            uint8_t *ptr, const int linesizes[4])
64. {

libavcore/imgutils.c:88:17: Array access: Offset: [1, 4] Size: 4
86. 
87.     total_size = size[0];
88.     for (i = 1; has_plane[i] && i < 4; i++) {
                    ^
89.         int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
90.         data[i] = data[i-1] + size[i-1];

int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,
                           uint8_t *ptr, const int linesizes[4])
{
    int i, total_size, size[4], has_plane[4];
    const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
    memset(data     , 0, sizeof(data[0])*4);
    memset(size     , 0, sizeof(size));
    memset(has_plane, 0, sizeof(has_plane));
    if (desc->flags & PIX_FMT_HWACCEL)
        return AVERROR(EINVAL);
    data[0] = ptr;
    size[0] = linesizes[0] * height;
    if (desc->flags & PIX_FMT_PAL) {
        size[0] = (size[0] + 3) & ~3;
        data[1] = ptr + size[0];
        return size[0] + 256 * 4;
    }
    for (i = 0; i < 4; i++)
        has_plane[desc->comp[i].plane] = 1;
    total_size = size[0];
    for (i = 1; has_plane[i] && i < 4; i++) {
        int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
        data[i] = data[i-1] + size[i-1];
        h = (height + (1 << s) - 1) >> s;
        size[i] = h * linesizes[i];
        total_size += size[i];
    }
    return total_size;
}
['int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height,\n                           uint8_t *ptr, const int linesizes[4])\n{\n    int i, total_size, size[4], has_plane[4];\n    const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];\n    memset(data     , 0, sizeof(data[0])*4);\n    memset(size     , 0, sizeof(size));\n    memset(has_plane, 0, sizeof(has_plane));\n    if (desc->flags & PIX_FMT_HWACCEL)\n        return AVERROR(EINVAL);\n    data[0] = ptr;\n    size[0] = linesizes[0] * height;\n    if (desc->flags & PIX_FMT_PAL) {\n        size[0] = (size[0] + 3) & ~3;\n        data[1] = ptr + size[0];\n        return size[0] + 256 * 4;\n    }\n    for (i = 0; i < 4; i++)\n        has_plane[desc->comp[i].plane] = 1;\n    total_size = size[0];\n    for (i = 1; has_plane[i] && i < 4; i++) {\n        int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;\n        data[i] = data[i-1] + size[i-1];\n        h = (height + (1 << s) - 1) >> s;\n        size[i] = h * linesizes[i];\n        total_size += size[i];\n    }\n    return total_size;\n}']