libavcodec/qtrle.c:116: error: Integer Overflow L2
  ([0, `*s->g.buffer`] - 1):unsigned32.

libavcodec/qtrle.c:104:1: <LHS trace>
102. }
103. 
104. static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr,
     ^
105.                                        int lines_to_change, int bpp)
106. {

libavcodec/qtrle.c:104:1: Parameter `*s->g.buffer`
102. }
103. 
104. static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr,
     ^
105.                                        int lines_to_change, int bpp)
106. {

libavcodec/qtrle.c:116:46: Call
114. 
115.     while (lines_to_change--) {
116.         pixel_ptr = row_ptr + (num_pixels * (bytestream2_get_byte(&s->g) - 1));
                                                  ^
117. 
118.         while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {

libavcodec/bytestream.h:92:1: Assignment
  90. DEF(unsigned int, be24, 3, AV_RB24, AV_WB24)
  91. DEF(unsigned int, be16, 2, AV_RB16, AV_WB16)
  92. DEF(unsigned int, byte, 1, AV_RB8 , AV_WB8)
      ^
  93. 
  94. #if HAVE_BIGENDIAN

libavcodec/qtrle.c:116:9: Binary operation: ([0, *s->g.buffer] - 1):unsigned32
114. 
115.     while (lines_to_change--) {
116.         pixel_ptr = row_ptr + (num_pixels * (bytestream2_get_byte(&s->g) - 1));
             ^
117. 
118.         while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {

static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr,
                                       int lines_to_change, int bpp)
{
    int rle_code, i;
    int pixel_ptr;
    int row_inc = s->frame.linesize[0];
    unsigned char pi[16];
    unsigned char *rgb = s->frame.data[0];
    int pixel_limit = s->frame.linesize[0] * s->avctx->height;
    int num_pixels = (bpp == 4) ? 8 : 16;
    while (lines_to_change--) {
        pixel_ptr = row_ptr + (num_pixels * (bytestream2_get_byte(&s->g) - 1));
        while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {
            if (rle_code == 0) {
                pixel_ptr += (num_pixels * (bytestream2_get_byte(&s->g) - 1));
                CHECK_PIXEL_PTR(0);
            } else if (rle_code < 0) {
                rle_code = -rle_code;
                for (i = num_pixels-1; i >= 0; i--) {
                    pi[num_pixels-1-i] = (bytestream2_peek_byte(&s->g) >> ((i*bpp) & 0x07)) & ((1<<bpp)-1);
                    bytestream2_skip(&s->g, ((i & ((num_pixels>>2)-1)) == 0));
                }
                CHECK_PIXEL_PTR(rle_code * num_pixels);
                while (rle_code--) {
                    for (i = 0; i < num_pixels; i++)
                        rgb[pixel_ptr++] = pi[i];
                }
            } else {
                rle_code *= 4;
                CHECK_PIXEL_PTR(rle_code*(num_pixels>>2));
                while (rle_code--) {
                    if(bpp == 4) {
                        int x = bytestream2_get_byte(&s->g);
                        rgb[pixel_ptr++] = (x >> 4) & 0x0f;
                        rgb[pixel_ptr++] =  x       & 0x0f;
                    } else {
                        int x = bytestream2_get_byte(&s->g);
                        rgb[pixel_ptr++] = (x >> 6) & 0x03;
                        rgb[pixel_ptr++] = (x >> 4) & 0x03;
                        rgb[pixel_ptr++] = (x >> 2) & 0x03;
                        rgb[pixel_ptr++] =  x       & 0x03;
                    }
                }
            }
        }
        row_ptr += row_inc;
    }
}
['static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr,\n                                       int lines_to_change, int bpp)\n{\n    int rle_code, i;\n    int pixel_ptr;\n    int row_inc = s->frame.linesize[0];\n    unsigned char pi[16];\n    unsigned char *rgb = s->frame.data[0];\n    int pixel_limit = s->frame.linesize[0] * s->avctx->height;\n    int num_pixels = (bpp == 4) ? 8 : 16;\n    while (lines_to_change--) {\n        pixel_ptr = row_ptr + (num_pixels * (bytestream2_get_byte(&s->g) - 1));\n        while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {\n            if (rle_code == 0) {\n                pixel_ptr += (num_pixels * (bytestream2_get_byte(&s->g) - 1));\n                CHECK_PIXEL_PTR(0);\n            } else if (rle_code < 0) {\n                rle_code = -rle_code;\n                for (i = num_pixels-1; i >= 0; i--) {\n                    pi[num_pixels-1-i] = (bytestream2_peek_byte(&s->g) >> ((i*bpp) & 0x07)) & ((1<<bpp)-1);\n                    bytestream2_skip(&s->g, ((i & ((num_pixels>>2)-1)) == 0));\n                }\n                CHECK_PIXEL_PTR(rle_code * num_pixels);\n                while (rle_code--) {\n                    for (i = 0; i < num_pixels; i++)\n                        rgb[pixel_ptr++] = pi[i];\n                }\n            } else {\n                rle_code *= 4;\n                CHECK_PIXEL_PTR(rle_code*(num_pixels>>2));\n                while (rle_code--) {\n                    if(bpp == 4) {\n                        int x = bytestream2_get_byte(&s->g);\n                        rgb[pixel_ptr++] = (x >> 4) & 0x0f;\n                        rgb[pixel_ptr++] =  x       & 0x0f;\n                    } else {\n                        int x = bytestream2_get_byte(&s->g);\n                        rgb[pixel_ptr++] = (x >> 6) & 0x03;\n                        rgb[pixel_ptr++] = (x >> 4) & 0x03;\n                        rgb[pixel_ptr++] = (x >> 2) & 0x03;\n                        rgb[pixel_ptr++] =  x       & 0x03;\n                    }\n                }\n            }\n        }\n        row_ptr += row_inc;\n    }\n}', 'DEF(unsigned int, byte, 1, AV_RB8 , AV_WB8)']