libavcodec/g2meet.c:918: error: Integer Overflow L2
  ([0, -1+max(1, `src_size`)] - [1, 3]):unsigned64 by call to `ff_els_decoder_init`.

libavcodec/g2meet.c:888:10: Assignment
886.     prefix = *src++;
887.     src_size--;
888.     for (extrabytes = 0; (prefix & mask) && (extrabytes < 7); extrabytes++)
              ^
889.         mask >>= 1;
890.     if (extrabytes > 3 || src_size < extrabytes) {

libavcodec/g2meet.c:918:9: Call
916.         /* ELS decoder initializations */
917.         memset(&c->ec, 0, sizeof(c->ec));
918.         ff_els_decoder_init(&c->ec.els_ctx, src, els_dsize);
             ^
919.         epic_hash_init(&c->ec.hash);
920. 

libavcodec/elsdec.c:247:1: <LHS trace>
245. };
246. 
247. void ff_els_decoder_init(ElsDecCtx *ctx, const uint8_t *in, size_t data_size)
     ^
248. {
249.     int nbytes;

libavcodec/elsdec.c:247:1: Parameter `data_size`
  245. };
  246. 
  247. void ff_els_decoder_init(ElsDecCtx *ctx, const uint8_t *in, size_t data_size)
       ^
  248. {
  249.     int nbytes;

libavcodec/elsdec.c:254:9: <RHS trace>
252.     if (data_size >= 3) {
253.         ctx->x = AV_RB24(in);
254.         nbytes = 3;
             ^
255.     } else if (data_size == 2) {
256.         ctx->x = AV_RB16(in);

libavcodec/elsdec.c:254:9: Assignment
  252.     if (data_size >= 3) {
  253.         ctx->x = AV_RB24(in);
  254.         nbytes = 3;
               ^
  255.     } else if (data_size == 2) {
  256.         ctx->x = AV_RB16(in);

libavcodec/elsdec.c:264:5: Binary operation: ([0, -1+max(1, src_size)] - [1, 3]):unsigned64 by call to `ff_els_decoder_init` 
  262. 
  263.     ctx->in_buf    = in + nbytes;
  264.     ctx->data_size = data_size - nbytes;
           ^
  265.     ctx->err       = 0;
  266.     ctx->j         = ELS_JOTS_PER_BYTE;

void ff_els_decoder_init(ElsDecCtx *ctx, const uint8_t *in, size_t data_size)
{
    int nbytes;
    if (data_size >= 3) {
        ctx->x = AV_RB24(in);
        nbytes = 3;
    } else if (data_size == 2) {
        ctx->x = AV_RB16(in);
        nbytes = 2;
    } else {
        ctx->x = *in;
        nbytes = 1;
    }
    ctx->in_buf    = in + nbytes;
    ctx->data_size = data_size - nbytes;
    ctx->err       = 0;
    ctx->j         = ELS_JOTS_PER_BYTE;
    ctx->t         = ELS_MAX;
    ctx->diff      = FFMIN(ELS_MAX - ctx->x,
                           ELS_MAX - els_exp_tab[ELS_JOTS_PER_BYTE * 4 - 1]);
}
['static int epic_jb_decode_tile(G2MContext *c, int tile_x, int tile_y,\n                               const uint8_t *src, size_t src_size,\n                               AVCodecContext *avctx)\n{\n    uint8_t prefix, mask = 0x80;\n    int extrabytes, tile_width, tile_height, awidth, aheight;\n    size_t els_dsize;\n    uint8_t *dst;\n    if (!src_size)\n        return 0;\n    prefix = *src++;\n    src_size--;\n    for (extrabytes = 0; (prefix & mask) && (extrabytes < 7); extrabytes++)\n        mask >>= 1;\n    if (extrabytes > 3 || src_size < extrabytes) {\n        av_log(avctx, AV_LOG_ERROR, "ePIC: invalid data size VLI\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    els_dsize = prefix & ((0x80 >> extrabytes) - 1);\n    while (extrabytes-- > 0) {\n        els_dsize = (els_dsize << 8) | *src++;\n        src_size--;\n    }\n    if (src_size < els_dsize) {\n        av_log(avctx, AV_LOG_ERROR, "ePIC: data too short, needed %zu, got %zu\\n",\n               els_dsize, src_size);\n        return AVERROR_INVALIDDATA;\n    }\n    tile_width  = FFMIN(c->width  - tile_x * c->tile_width,  c->tile_width);\n    tile_height = FFMIN(c->height - tile_y * c->tile_height, c->tile_height);\n    awidth      = FFALIGN(tile_width,  16);\n    aheight     = FFALIGN(tile_height, 16);\n    if (els_dsize) {\n        int ret, i, j, k;\n        uint8_t tr_r, tr_g, tr_b, *buf;\n        uint32_t *in;\n        memset(&c->ec, 0, sizeof(c->ec));\n        ff_els_decoder_init(&c->ec.els_ctx, src, els_dsize);\n        epic_hash_init(&c->ec.hash);\n        tr_r = ff_els_decode_unsigned(&c->ec.els_ctx, &c->ec.unsigned_rung);\n        tr_g = ff_els_decode_unsigned(&c->ec.els_ctx, &c->ec.unsigned_rung);\n        tr_b = ff_els_decode_unsigned(&c->ec.els_ctx, &c->ec.unsigned_rung);\n        if (c->ec.els_ctx.err != 0) {\n            av_log(avctx, AV_LOG_ERROR,\n                   "ePIC: couldn\'t decode transparency pixel!\\n");\n            return AVERROR_INVALIDDATA;\n        }\n        ret = epic_decode_tile(&c->ec, c->epic_buf, tile_height, tile_width,\n                               c->epic_buf_stride);\n        epic_free_pixel_cache(&c->ec.hash);\n        ff_els_decoder_uninit(&c->ec.unsigned_rung);\n        if (ret) {\n            av_log(avctx, AV_LOG_ERROR,\n                   "ePIC: tile decoding failed, frame=%d, tile_x=%d, tile_y=%d\\n",\n                   avctx->frame_number, tile_x, tile_y);\n            return AVERROR_INVALIDDATA;\n        }\n        buf = c->epic_buf;\n        dst = c->framebuf + tile_x * c->tile_width * 3 +\n              tile_y * c->tile_height * c->framebuf_stride;\n        for (j = 0; j < tile_height; j++) {\n            uint8_t *out = dst;\n            in  = (uint32_t *) buf;\n            for (i = 0; i < tile_width; i++) {\n                out[0] = (in[i] >> R_shift) & 0xFF;\n                out[1] = (in[i] >> G_shift) & 0xFF;\n                out[2] = (in[i] >> B_shift) & 0xFF;\n                out   += 3;\n            }\n            buf += c->epic_buf_stride;\n            dst += c->framebuf_stride;\n        }\n        if (src_size > els_dsize) {\n            uint8_t *jpg;\n            uint32_t tr;\n            int bstride = FFALIGN(tile_width, 16) >> 3;\n            int nblocks = 0;\n            int estride = c->epic_buf_stride >> 2;\n            src      += els_dsize;\n            src_size -= els_dsize;\n            in = (uint32_t *) c->epic_buf;\n            tr = (tr_r << R_shift) | (tr_g << G_shift) | (tr_b << B_shift);\n            memset(c->kempf_flags, 0,\n                   (aheight >> 3) * bstride * sizeof(*c->kempf_flags));\n            for (j = 0; j < tile_height; j += 8) {\n                for (i = 0; i < tile_width; i += 8) {\n                    c->kempf_flags[(i >> 3) + (j >> 3) * bstride] = 0;\n                    for (k = 0; k < 8 * 8; k++) {\n                        if (in[i + (k & 7) + (k >> 3) * estride] == tr) {\n                            c->kempf_flags[(i >> 3) + (j >> 3) * bstride] = 1;\n                            nblocks++;\n                            break;\n                        }\n                    }\n                }\n                in += 8 * estride;\n            }\n            memset(c->jpeg_tile, 0, c->tile_stride * aheight);\n            jpg_decode_data(&c->jc, awidth, aheight, src, src_size,\n                            c->jpeg_tile, c->tile_stride,\n                            c->kempf_flags, bstride, nblocks, c->swapuv);\n            in  = (uint32_t *) c->epic_buf;\n            dst = c->framebuf + tile_x * c->tile_width * 3 +\n                  tile_y * c->tile_height * c->framebuf_stride;\n            jpg = c->jpeg_tile;\n            for (j = 0; j < tile_height; j++) {\n                for (i = 0; i < tile_width; i++)\n                    if (in[i] == tr)\n                        memcpy(dst + i * 3, jpg + i * 3, 3);\n                in  += c->epic_buf_stride >> 2;\n                dst += c->framebuf_stride;\n                jpg += c->tile_stride;\n            }\n        }\n    } else {\n        dst = c->framebuf + tile_x * c->tile_width * 3 +\n              tile_y * c->tile_height * c->framebuf_stride;\n        return jpg_decode_data(&c->jc, tile_width, tile_height, src, src_size,\n                               dst, c->framebuf_stride, NULL, 0, 0, c->swapuv);\n    }\n    return 0;\n}', 'void ff_els_decoder_init(ElsDecCtx *ctx, const uint8_t *in, size_t data_size)\n{\n    int nbytes;\n    if (data_size >= 3) {\n        ctx->x = AV_RB24(in);\n        nbytes = 3;\n    } else if (data_size == 2) {\n        ctx->x = AV_RB16(in);\n        nbytes = 2;\n    } else {\n        ctx->x = *in;\n        nbytes = 1;\n    }\n    ctx->in_buf    = in + nbytes;\n    ctx->data_size = data_size - nbytes;\n    ctx->err       = 0;\n    ctx->j         = ELS_JOTS_PER_BYTE;\n    ctx->t         = ELS_MAX;\n    ctx->diff      = FFMIN(ELS_MAX - ctx->x,\n                           ELS_MAX - els_exp_tab[ELS_JOTS_PER_BYTE * 4 - 1]);\n}']