crypto/bn/bn_exp.c:325: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_mul_reciprocal`.
Showing all 23 steps of the trace


crypto/bn/bn_exp.c:308:13: Call
306.               goto err;
307.           aa->neg = 0;
308.           if (BN_RECP_CTX_set(&recp, aa, ctx) <= 0)
                   ^
309.               goto err;
310.       } else {

crypto/bn/bn_recp.c:95:10: Call
  93.   int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
  94.   {
  95.       if (!BN_copy(&(recp->N), d))
                 ^
  96.           return 0;
  97.       BN_zero(&(recp->Nr));

crypto/bn/bn_lib.c:429:1: Parameter `a->top`
    427.   }
    428.   
    429. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    430.   {
    431.       int i;

crypto/bn/bn_exp.c:325:14: Call
323.       window = BN_window_bits_for_exponent_size(bits);
324.       if (window > 1) {
325.           if (!BN_mod_mul_reciprocal(aa, val[0], val[0], &recp, ctx))
                    ^
326.               goto err;           /* 2 */
327.           j = 1 << (window - 1);

crypto/bn/bn_recp.c:103:1: Parameter `recp->N.top`
  101.   }
  102.   
  103. > int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
  104.                             BN_RECP_CTX *recp, BN_CTX *ctx)
  105.   {

crypto/bn/bn_recp.c:125:11: Call
  123.           ca = x;                 /* Just do the mod */
  124.   
  125.       ret = BN_div_recp(NULL, r, ca, recp, ctx);
                   ^
  126.    err:
  127.       BN_CTX_end(ctx);

crypto/bn/bn_recp.c:132:1: Parameter `recp->N.top`
    130.   }
    131.   
    132. > int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
    133.                   BN_RECP_CTX *recp, BN_CTX *ctx)
    134.   {

crypto/bn/bn_recp.c:175:23: Call
    173.       /* Nr := round(2^i / N) */
    174.       if (i != recp->shift)
    175.           recp->shift = BN_reciprocal(&(recp->Nr), &(recp->N), i, ctx);
                                 ^
    176.       /* BN_reciprocal could have returned -1 for an error */
    177.       if (recp->shift == -1)

crypto/bn/bn_recp.c:228:1: Parameter `m->top`
      226.    */
      227.   /* r := 2^len / m */
      228. > int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx)
      229.   {
      230.       int ret = -1;

crypto/bn/bn_recp.c:240:10: Call
      238.           goto err;
      239.   
      240.       if (!BN_div(r, NULL, t, m, ctx))
                      ^
      241.           goto err;
      242.   

crypto/bn/bn_div.c:254:31: Call
        252.   
        253.       /* First we normalise the numbers */
        254.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                                             ^
        255.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
        256.           goto err;

crypto/bn/bn_lib.c:221:9: Assignment
          219.   
          220.       if (BN_is_zero(a))
          221.           return 0;
                         ^
          222.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
          223.   }

crypto/bn/bn_div.c:254:5: Assignment
        252.   
        253.       /* First we normalise the numbers */
        254.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                   ^
        255.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
        256.           goto err;

crypto/bn/bn_div.c:255:11: Call
        253.       /* First we normalise the numbers */
        254.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
        255.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                         ^
        256.           goto err;
        257.       sdiv->neg = 0;

crypto/bn/bn_shift.c:130:1: <Offset trace>
128.   }
129.   
130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
131.   {
132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:130:1: Parameter `n`
          128.   }
          129.   
          130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
          131.   {
          132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:145:5: Assignment
          143.   
          144.       r->neg = a->neg;
          145.       nw = n / BN_BITS2;
                     ^
          146.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
          147.           return (0);

crypto/bn/bn_shift.c:130:1: <Length trace>
128.   }
129.   
130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
131.   {
132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:130:1: Parameter `*r->d`
          128.   }
          129.   
          130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
          131.   {
          132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:146:9: Call
          144.       r->neg = a->neg;
          145.       nw = n / BN_BITS2;
          146.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                         ^
          147.           return (0);
          148.       lb = n % BN_BITS2;

crypto/bn/bn_lib.c:995:1: Parameter `*a->d`
            993.   }
            994.   
            995. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
            996.   {
            997.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:151:5: Assignment
          149.       rb = BN_BITS2 - lb;
          150.       f = a->d;
          151.       t = r->d;
                     ^
          152.       t[a->top + nw] = 0;
          153.       if (lb == 0)

crypto/bn/bn_shift.c:159:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_mul_reciprocal` 
          157.           for (i = a->top - 1; i >= 0; i--) {
          158.               l = f[i];
          159.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                             ^
          160.               t[nw + i] = (l << lb) & BN_MASK2;
          161.           }
