libavcodec/jpeg2000dec.c:1119: error: Buffer Overrun L3
  Offset: [-1, +oo] Size: 32 by call to `ff_dwt_decode`.

libavcodec/jpeg2000dec.c:1119:9: Call
1117. 
1118.         /* inverse DWT */
1119.         ff_dwt_decode(&comp->dwt, codsty->transform == FF_DWT97 ? (void*)comp->f_data : (void*)comp->i_data);
              ^
1120.     } /*end comp */
1121. 

libavcodec/jpeg2000dwt.c:349:1: Parameter `s->ndeclevels`
  347. }
  348. 
  349. int ff_dwt_decode(DWTContext *s, void *t)
       ^
  350. {
  351.     switch (s->type) {

libavcodec/jpeg2000dec.c:1119:9: Call
1117. 
1118.         /* inverse DWT */
1119.         ff_dwt_decode(&comp->dwt, codsty->transform == FF_DWT97 ? (void*)comp->f_data : (void*)comp->i_data);
              ^
1120.     } /*end comp */
1121. 

libavcodec/jpeg2000dwt.c:349:1: Parameter `s->ndeclevels`
  347. }
  348. 
  349. int ff_dwt_decode(DWTContext *s, void *t)
       ^
  350. {
  351.     switch (s->type) {

libavcodec/jpeg2000dwt.c:359:9: Call
  357.         break;
  358.     case FF_DWT53:
  359.         dwt_decode53(s, t);
               ^
  360.         break;
  361.     default:

libavcodec/jpeg2000dwt.c:98:1: <Offset trace>
 96. }
 97. 
 98. static void dwt_decode53(DWTContext *s, int *t)
     ^
 99. {
100.     int lev;

libavcodec/jpeg2000dwt.c:98:1: Parameter `s->ndeclevels`
     96. }
     97. 
     98. static void dwt_decode53(DWTContext *s, int *t)
         ^
     99. {
    100.     int lev;

libavcodec/jpeg2000dwt.c:98:1: <Length trace>
 96. }
 97. 
 98. static void dwt_decode53(DWTContext *s, int *t)
     ^
 99. {
100.     int lev;

libavcodec/jpeg2000dwt.c:98:1: Parameter `s->linelen[*]`
     96. }
     97. 
     98. static void dwt_decode53(DWTContext *s, int *t)
         ^
     99. {
    100.     int lev;

libavcodec/jpeg2000dwt.c:101:17: Array access: Offset: [-1, +oo] Size: 32 by call to `ff_dwt_decode` 
     99. {
    100.     int lev;
    101.     int w     = s->linelen[s->ndeclevels - 1][0];
                         ^
    102.     int32_t *line = s->i_linebuf;
    103.     line += 3;

static void dwt_decode53(DWTContext *s, int *t)
{
    int lev;
    int w     = s->linelen[s->ndeclevels - 1][0];
    int32_t *line = s->i_linebuf;
    line += 3;
    for (lev = 0; lev < s->ndeclevels; lev++) {
        int lh = s->linelen[lev][0],
            lv = s->linelen[lev][1],
            mh = s->mod[lev][0],
            mv = s->mod[lev][1],
            lp;
        int *l;
        l = line + mh;
        for (lp = 0; lp < lv; lp++) {
            int i, j = 0;
            for (i = mh; i < lh; i += 2, j++)
                l[i] = t[w * lp + j];
            for (i = 1 - mh; i < lh; i += 2, j++)
                l[i] = t[w * lp + j];
            sr_1d53(line, mh, mh + lh);
            for (i = 0; i < lh; i++)
                t[w * lp + i] = l[i];
        }
        l = line + mv;
        for (lp = 0; lp < lh; lp++) {
            int i, j = 0;
            for (i = mv; i < lv; i += 2, j++)
                l[i] = t[w * j + lp];
            for (i = 1 - mv; i < lv; i += 2, j++)
                l[i] = t[w * j + lp];
            sr_1d53(line, mv, mv + lv);
            for (i = 0; i < lv; i++)
                t[w * i + lp] = l[i];
        }
    }
}
['static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,\n                                AVFrame *picture)\n{\n    int compno, reslevelno, bandno;\n    int x, y;\n    uint8_t *line;\n    Jpeg2000T1Context t1;\n    for (compno = 0; compno < s->ncomponents; compno++) {\n        Jpeg2000Component *comp     = tile->comp + compno;\n        Jpeg2000CodingStyle *codsty = tile->codsty + compno;\n        for (reslevelno = 0; reslevelno < codsty->nreslevels2decode; reslevelno++) {\n            Jpeg2000ResLevel *rlevel = comp->reslevel + reslevelno;\n            for (bandno = 0; bandno < rlevel->nbands; bandno++) {\n                uint16_t nb_precincts, precno;\n                Jpeg2000Band *band = rlevel->band + bandno;\n                int cblkno = 0, bandpos;\n                bandpos = bandno + (reslevelno > 0);\n                nb_precincts = rlevel->num_precincts_x * rlevel->num_precincts_y;\n                for (precno = 0; precno < nb_precincts; precno++) {\n                    Jpeg2000Prec *prec = band->prec + precno;\n                    for (cblkno = 0; cblkno < prec->nb_codeblocks_width * prec->nb_codeblocks_height; cblkno++) {\n                        int x, y;\n                        Jpeg2000Cblk *cblk = prec->cblk + cblkno;\n                        decode_cblk(s, codsty, &t1, cblk,\n                                    cblk->coord[0][1] - cblk->coord[0][0],\n                                    cblk->coord[1][1] - cblk->coord[1][0],\n                                    bandpos);\n                        x = cblk->coord[0][0];\n                        y = cblk->coord[1][0];\n                        if (codsty->transform == FF_DWT97)\n                            dequantization_float(x, y, cblk, comp, &t1, band);\n                        else\n                            dequantization_int(x, y, cblk, comp, &t1, band);\n                   }\n                }\n            }\n        }\n        ff_dwt_decode(&comp->dwt, codsty->transform == FF_DWT97 ? (void*)comp->f_data : (void*)comp->i_data);\n    }\n    if (tile->codsty[0].mct)\n        mct_decode(s, tile);\n    if (s->precision <= 8) {\n        for (compno = 0; compno < s->ncomponents; compno++) {\n            Jpeg2000Component *comp = tile->comp + compno;\n            float *datap = comp->f_data;\n            int32_t *i_datap = comp->i_data;\n            y    = tile->comp[compno].coord[1][0] - s->image_offset_y;\n            line = picture->data[0] + y * picture->linesize[0];\n            for (; y < tile->comp[compno].coord[1][1] - s->image_offset_y; y += s->cdy[compno]) {\n                uint8_t *dst;\n                x   = tile->comp[compno].coord[0][0] - s->image_offset_x;\n                dst = line + x * s->ncomponents + compno;\n                for (; x < tile->comp[compno].coord[0][1] - s->image_offset_x; x += s->cdx[compno]) {\n                     int val;\n                    if (tile->codsty->transform == FF_DWT97)\n                        val = lrintf(*datap) + (1 << (s->cbps[compno] - 1));\n                    else\n                        val = *i_datap + (1 << (s->cbps[compno] - 1));\n                    val = av_clip(val, 0, (1 << s->cbps[compno]) - 1);\n                    *dst = val << (8 - s->cbps[compno]);\n                    datap++;\n                    i_datap++;\n                    dst += s->ncomponents;\n                }\n                line += picture->linesize[0];\n            }\n        }\n    } else {\n        for (compno = 0; compno < s->ncomponents; compno++) {\n            Jpeg2000Component *comp = tile->comp + compno;\n            float *datap = comp->f_data;\n            int32_t *i_datap = comp->i_data;\n            uint16_t *linel;\n            y     = tile->comp[compno].coord[1][0] - s->image_offset_y;\n            linel = (uint16_t *)picture->data[0] + y * (picture->linesize[0] >> 1);\n            for (; y < tile->comp[compno].coord[1][1] - s->image_offset_y; y += s->cdy[compno]) {\n                uint16_t *dst;\n                x   = tile->comp[compno].coord[0][0] - s->image_offset_x;\n                dst = linel + (x * s->ncomponents + compno);\n                for (; x < s->avctx->width; x += s->cdx[compno]) {\n                    int val;\n                    if (tile->codsty->transform == FF_DWT97)\n                        val = lrintf(*datap) + (1 << (s->cbps[compno] - 1));\n                    else\n                        val = *i_datap + (1 << (s->cbps[compno] - 1));\n                    val = av_clip(val, 0, (1 << s->cbps[compno]) - 1);\n                    *dst = val << (16 - s->cbps[compno]);\n                    datap++;\n                    i_datap++;\n                    dst += s->ncomponents;\n                }\n                linel += picture->linesize[0] >> 1;\n            }\n        }\n    }\n    return 0;\n}', 'int ff_dwt_decode(DWTContext *s, void *t)\n{\n    switch (s->type) {\n    case FF_DWT97:\n        dwt_decode97_float(s, t);\n        break;\n    case FF_DWT97_INT:\n        dwt_decode97_int(s, t);\n        break;\n    case FF_DWT53:\n        dwt_decode53(s, t);\n        break;\n    default:\n        return -1;\n    }\n    return 0;\n}', 'static void dwt_decode53(DWTContext *s, int *t)\n{\n    int lev;\n    int w     = s->linelen[s->ndeclevels - 1][0];\n    int32_t *line = s->i_linebuf;\n    line += 3;\n    for (lev = 0; lev < s->ndeclevels; lev++) {\n        int lh = s->linelen[lev][0],\n            lv = s->linelen[lev][1],\n            mh = s->mod[lev][0],\n            mv = s->mod[lev][1],\n            lp;\n        int *l;\n        l = line + mh;\n        for (lp = 0; lp < lv; lp++) {\n            int i, j = 0;\n            for (i = mh; i < lh; i += 2, j++)\n                l[i] = t[w * lp + j];\n            for (i = 1 - mh; i < lh; i += 2, j++)\n                l[i] = t[w * lp + j];\n            sr_1d53(line, mh, mh + lh);\n            for (i = 0; i < lh; i++)\n                t[w * lp + i] = l[i];\n        }\n        l = line + mv;\n        for (lp = 0; lp < lh; lp++) {\n            int i, j = 0;\n            for (i = mv; i < lv; i += 2, j++)\n                l[i] = t[w * j + lp];\n            for (i = 1 - mv; i < lv; i += 2, j++)\n                l[i] = t[w * j + lp];\n            sr_1d53(line, mv, mv + lv);\n            for (i = 0; i < lv; i++)\n                t[w * i + lp] = l[i];\n        }\n    }\n}']