libavcodec/opus_silk.c:1099: error: Buffer Overrun L2
  Offset: [-14, 16] (⇐ [0, 2] + [-14, 14]) Size: 2 by call to `silk_lsf2lpc`.

libavcodec/opus_silk.c:1034:10: Assignment
1032.     /* obtain LSF stage-1 and stage-2 indices */
1033.     lsf_i1 = opus_rc_getsymbol(rc, silk_model_lsf_s1[s->wb][voiced]);
1034.     for (i = 0; i < order; i++) {
               ^
1035.         int index = s->wb ? silk_lsf_s2_model_sel_wb  [lsf_i1][i] :
1036.                             silk_lsf_s2_model_sel_nbmb[lsf_i1][i];

libavcodec/opus_silk.c:1099:17: Call
1097.                     nlsf_leadin[i] = frame->nlsf[i] +
1098.                         ((nlsf[i] - frame->nlsf[i]) * offset >> 2);
1099.                 silk_lsf2lpc(nlsf_leadin, lpc_leadin, order);
                      ^
1100.             } else  /* avoid re-computation for a (roughly) 1-in-4 occurrence */
1101.                 memcpy(lpc_leadin, frame->lpc, 16 * sizeof(float));

libavcodec/opus_silk.c:934:1: Parameter `order`
  932. }
  933. 
  934. static void silk_lsf2lpc(const int16_t nlsf[16], float lpcf[16], int order)
       ^
  935. {
  936.     int i, k;

libavcodec/opus_silk.c:1004:29: Call
  1002.     /* if the prediction gain causes the LPC filter to become unstable,
  1003.        apply further bandwidth expansion on the Q17 coefficients */
  1004.     for (i = 1; i <= 16 && !silk_is_lpc_stable(lpc, order); i++) {
                                    ^
  1005.         unsigned int chirp, chirp_base;
  1006.         chirp_base = chirp = 65536 - (1 << i);

libavcodec/opus_silk.c:911:14: <Offset trace>
909.         row = lpc32[k & 1];
910. 
911.         for (j = 0; j < k; j++) {
                  ^
912.             int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);
913.             row[j] = ROUND_MULL(x, gain, fbits);

libavcodec/opus_silk.c:911:14: Assignment
    909.         row = lpc32[k & 1];
    910. 
    911.         for (j = 0; j < k; j++) {
                      ^
    912.             int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);
    913.             row[j] = ROUND_MULL(x, gain, fbits);

libavcodec/opus_silk.c:867:1: <Length trace>
865. }
866. 
867. static inline int silk_is_lpc_stable(const int16_t lpc[16], int order)
     ^
868. {
869.     int k, j, DC_resp = 0;

libavcodec/opus_silk.c:867:1: Array declaration
    865. }
    866. 
    867. static inline int silk_is_lpc_stable(const int16_t lpc[16], int order)
         ^
    868. {
    869.     int k, j, DC_resp = 0;

libavcodec/opus_silk.c:872:5: Assignment
    870.     int32_t lpc32[2][16];       // Q24
    871.     int totalinvgain = 1 << 30; // 1.0 in Q30
    872.     int32_t *row = lpc32[0], *prevrow;
             ^
    873. 
    874.     /* initialize the first row for the Levinson recursion */

libavcodec/opus_silk.c:908:9: Assignment
    906. 
    907.         /* switch to the next row of the LPC coefficients */
    908.         prevrow = row;
                 ^
    909.         row = lpc32[k & 1];
    910. 

libavcodec/opus_silk.c:912:34: Array access: Offset: [-14, 16] (⇐ [0, 2] + [-14, 14]) Size: 2 by call to `silk_lsf2lpc` 
    910. 
    911.         for (j = 0; j < k; j++) {
    912.             int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);
                                          ^
    913.             row[j] = ROUND_MULL(x, gain, fbits);
    914.         }

static inline int silk_is_lpc_stable(const int16_t lpc[16], int order)
{
    int k, j, DC_resp = 0;
    int32_t lpc32[2][16];
    int totalinvgain = 1 << 30;
    int32_t *row = lpc32[0], *prevrow;
    for (k = 0; k < order; k++) {
        DC_resp += lpc[k];
        row[k] = lpc[k] * 4096;
    }
    if (DC_resp >= 4096)
        return 0;
    for (k = order - 1; 1; k--) {
        int rc;
        int gaindiv;
        int gain;
        int fbits;
        int error;
        if (FFABS(row[k]) > 16773022)
            return 0;
        rc      = -(row[k] * 128);
        gaindiv = (1 << 30) - MULH(rc, rc);
        totalinvgain = MULH(totalinvgain, gaindiv) << 2;
        if (k == 0)
            return (totalinvgain >= 107374);
        fbits = opus_ilog(gaindiv);
        gain  = ((1 << 29) - 1) / (gaindiv >> (fbits + 1 - 16));
        error = (1 << 29) - MULL(gaindiv << (15 + 16 - fbits), gain, 16);
        gain  = ((gain << 16) + (error * gain >> 13));
        prevrow = row;
        row = lpc32[k & 1];
        for (j = 0; j < k; j++) {
            int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);
            row[j] = ROUND_MULL(x, gain, fbits);
        }
    }
}
['static inline void silk_decode_lpc(SilkContext *s, SilkFrame *frame,\n                                   OpusRangeCoder *rc,\n                                   float lpc_leadin[16], float lpc[16],\n                                   int *lpc_order, int *has_lpc_leadin, int voiced)\n{\n    int i;\n    int order;\n    int8_t  lsf_i1, lsf_i2[16];\n    int16_t lsf_res[16];\n    int16_t nlsf[16];\n    *lpc_order = order = s->wb ? 16 : 10;\n    lsf_i1 = opus_rc_getsymbol(rc, silk_model_lsf_s1[s->wb][voiced]);\n    for (i = 0; i < order; i++) {\n        int index = s->wb ? silk_lsf_s2_model_sel_wb  [lsf_i1][i] :\n                            silk_lsf_s2_model_sel_nbmb[lsf_i1][i];\n        lsf_i2[i] = opus_rc_getsymbol(rc, silk_model_lsf_s2[index]) - 4;\n        if (lsf_i2[i] == -4)\n            lsf_i2[i] -= opus_rc_getsymbol(rc, silk_model_lsf_s2_ext);\n        else if (lsf_i2[i] == 4)\n            lsf_i2[i] += opus_rc_getsymbol(rc, silk_model_lsf_s2_ext);\n    }\n    for (i = order - 1; i >= 0; i--) {\n        int qstep = s->wb ? 9830 : 11796;\n        lsf_res[i] = lsf_i2[i] * 1024;\n        if (lsf_i2[i] < 0)      lsf_res[i] += 102;\n        else if (lsf_i2[i] > 0) lsf_res[i] -= 102;\n        lsf_res[i] = (lsf_res[i] * qstep) >> 16;\n        if (i + 1 < order) {\n            int weight = s->wb ? silk_lsf_pred_weights_wb  [silk_lsf_weight_sel_wb  [lsf_i1][i]][i] :\n                                 silk_lsf_pred_weights_nbmb[silk_lsf_weight_sel_nbmb[lsf_i1][i]][i];\n            lsf_res[i] += (lsf_res[i+1] * weight) >> 8;\n        }\n    }\n    for (i = 0; i < order; i++) {\n        const uint8_t * codebook = s->wb ? silk_lsf_codebook_wb  [lsf_i1] :\n                                           silk_lsf_codebook_nbmb[lsf_i1];\n        int cur, prev, next, weight_sq, weight, ipart, fpart, y, value;\n        cur = codebook[i];\n        prev = i ? codebook[i - 1] : 0;\n        next = i + 1 < order ? codebook[i + 1] : 256;\n        weight_sq = (1024 / (cur - prev) + 1024 / (next - cur)) << 16;\n        ipart = opus_ilog(weight_sq);\n        fpart = (weight_sq >> (ipart-8)) & 127;\n        y = ((ipart & 1) ? 32768 : 46214) >> ((32 - ipart)>>1);\n        weight = y + ((213 * fpart * y) >> 16);\n        value = cur * 128 + (lsf_res[i] * 16384) / weight;\n        nlsf[i] = av_clip(value, 0, 32767);\n    }\n    silk_stabilize_lsf(nlsf, order, s->wb ? silk_lsf_min_spacing_wb :\n                                            silk_lsf_min_spacing_nbmb);\n    *has_lpc_leadin = 0;\n    if (s->subframes == 4) {\n        int offset = opus_rc_getsymbol(rc, silk_model_lsf_interpolation_offset);\n        if (offset != 4 && frame->coded) {\n            *has_lpc_leadin = 1;\n            if (offset != 0) {\n                int16_t nlsf_leadin[16];\n                for (i = 0; i < order; i++)\n                    nlsf_leadin[i] = frame->nlsf[i] +\n                        ((nlsf[i] - frame->nlsf[i]) * offset >> 2);\n                silk_lsf2lpc(nlsf_leadin, lpc_leadin, order);\n            } else\n                memcpy(lpc_leadin, frame->lpc, 16 * sizeof(float));\n        } else\n            offset = 4;\n        s->nlsf_interp_factor = offset;\n        silk_lsf2lpc(nlsf, lpc, order);\n    } else {\n        s->nlsf_interp_factor = 4;\n        silk_lsf2lpc(nlsf, lpc, order);\n    }\n    memcpy(frame->nlsf, nlsf, order * sizeof(nlsf[0]));\n    memcpy(frame->lpc,  lpc,  order * sizeof(lpc[0]));\n}', 'static void silk_lsf2lpc(const int16_t nlsf[16], float lpcf[16], int order)\n{\n    int i, k;\n    int32_t lsp[16];\n    int32_t p[9], q[9];\n    int32_t lpc32[16];\n    int16_t lpc[16];\n    for (k = 0; k < order; k++) {\n        int index = nlsf[k] >> 8;\n        int offset = nlsf[k] & 255;\n        int k2 = (order == 10) ? silk_lsf_ordering_nbmb[k] : silk_lsf_ordering_wb[k];\n        lsp[k2]  = silk_cosine[index] * 256;\n        lsp[k2] += (silk_cosine[index + 1] - silk_cosine[index]) * offset;\n        lsp[k2]  = (lsp[k2] + 4) >> 3;\n    }\n    silk_lsp2poly(lsp    , p, order >> 1);\n    silk_lsp2poly(lsp + 1, q, order >> 1);\n    for (k = 0; k < order>>1; k++) {\n        lpc32[k]         = -p[k + 1] - p[k] - q[k + 1] + q[k];\n        lpc32[order-k-1] = -p[k + 1] - p[k] + q[k + 1] - q[k];\n    }\n    for (i = 0; i < 10; i++) {\n        int j;\n        unsigned int maxabs = 0;\n        for (j = 0, k = 0; j < order; j++) {\n            unsigned int x = FFABS(lpc32[k]);\n            if (x > maxabs) {\n                maxabs = x;\n                k      = j;\n            }\n        }\n        maxabs = (maxabs + 16) >> 5;\n        if (maxabs > 32767) {\n            unsigned int chirp, chirp_base;\n            maxabs = FFMIN(maxabs, 163838);\n            chirp_base = chirp = 65470 - ((maxabs - 32767) << 14) / ((maxabs * (k+1)) >> 2);\n            for (k = 0; k < order; k++) {\n                lpc32[k] = ROUND_MULL(lpc32[k], chirp, 16);\n                chirp    = (chirp_base * chirp + 32768) >> 16;\n            }\n        } else break;\n    }\n    if (i == 10) {\n        for (k = 0; k < order; k++) {\n            int x = (lpc32[k] + 16) >> 5;\n            lpc[k] = av_clip_int16(x);\n            lpc32[k] = lpc[k] << 5;\n        }\n    } else {\n        for (k = 0; k < order; k++)\n            lpc[k] = (lpc32[k] + 16) >> 5;\n    }\n    for (i = 1; i <= 16 && !silk_is_lpc_stable(lpc, order); i++) {\n        unsigned int chirp, chirp_base;\n        chirp_base = chirp = 65536 - (1 << i);\n        for (k = 0; k < order; k++) {\n            lpc32[k] = ROUND_MULL(lpc32[k], chirp, 16);\n            lpc[k]   = (lpc32[k] + 16) >> 5;\n            chirp    = (chirp_base * chirp + 32768) >> 16;\n        }\n    }\n    for (i = 0; i < order; i++)\n        lpcf[i] = lpc[i] / 4096.0f;\n}', 'static inline int silk_is_lpc_stable(const int16_t lpc[16], int order)\n{\n    int k, j, DC_resp = 0;\n    int32_t lpc32[2][16];\n    int totalinvgain = 1 << 30;\n    int32_t *row = lpc32[0], *prevrow;\n    for (k = 0; k < order; k++) {\n        DC_resp += lpc[k];\n        row[k] = lpc[k] * 4096;\n    }\n    if (DC_resp >= 4096)\n        return 0;\n    for (k = order - 1; 1; k--) {\n        int rc;\n        int gaindiv;\n        int gain;\n        int fbits;\n        int error;\n        if (FFABS(row[k]) > 16773022)\n            return 0;\n        rc      = -(row[k] * 128);\n        gaindiv = (1 << 30) - MULH(rc, rc);\n        totalinvgain = MULH(totalinvgain, gaindiv) << 2;\n        if (k == 0)\n            return (totalinvgain >= 107374);\n        fbits = opus_ilog(gaindiv);\n        gain  = ((1 << 29) - 1) / (gaindiv >> (fbits + 1 - 16));\n        error = (1 << 29) - MULL(gaindiv << (15 + 16 - fbits), gain, 16);\n        gain  = ((gain << 16) + (error * gain >> 13));\n        prevrow = row;\n        row = lpc32[k & 1];\n        for (j = 0; j < k; j++) {\n            int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);\n            row[j] = ROUND_MULL(x, gain, fbits);\n        }\n    }\n}']