crypto/bn/bn_exp.c:225: 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:208:13: Call
206.               goto err;
207.           aa->neg = 0;
208.           if (BN_RECP_CTX_set(&recp, aa, ctx) <= 0)
                   ^
209.               goto err;
210.       } else {

crypto/bn/bn_recp.c:46:10: Call
  44.   int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
  45.   {
  46.       if (!BN_copy(&(recp->N), d))
                 ^
  47.           return 0;
  48.       BN_zero(&(recp->Nr));

crypto/bn/bn_lib.c:362:1: Parameter `a->top`
    360.   }
    361.   
    362. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    363.   {
    364.       int i;

crypto/bn/bn_exp.c:225:14: Call
223.       window = BN_window_bits_for_exponent_size(bits);
224.       if (window > 1) {
225.           if (!BN_mod_mul_reciprocal(aa, val[0], val[0], &recp, ctx))
                    ^
226.               goto err;           /* 2 */
227.           j = 1 << (window - 1);

crypto/bn/bn_recp.c:54:1: Parameter `recp->N.top`
  52.   }
  53.   
  54. > int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
  55.                             BN_RECP_CTX *recp, BN_CTX *ctx)
  56.   {

crypto/bn/bn_recp.c:76:11: Call
  74.           ca = x;                 /* Just do the mod */
  75.   
  76.       ret = BN_div_recp(NULL, r, ca, recp, ctx);
                  ^
  77.    err:
  78.       BN_CTX_end(ctx);

crypto/bn/bn_recp.c:83:1: Parameter `recp->N.top`
    81.   }
    82.   
    83. > int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
    84.                   BN_RECP_CTX *recp, BN_CTX *ctx)
    85.   {

crypto/bn/bn_recp.c:126:23: Call
    124.       /* Nr := round(2^i / N) */
    125.       if (i != recp->shift)
    126.           recp->shift = BN_reciprocal(&(recp->Nr), &(recp->N), i, ctx);
                                 ^
    127.       /* BN_reciprocal could have returned -1 for an error */
    128.       if (recp->shift == -1)

crypto/bn/bn_recp.c:179:1: Parameter `m->top`
      177.    */
      178.   /* r := 2^len / m */
      179. > int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx)
      180.   {
      181.       int ret = -1;

crypto/bn/bn_recp.c:191:10: Call
      189.           goto err;
      190.   
      191.       if (!BN_div(r, NULL, t, m, ctx))
                      ^
      192.           goto err;
      193.   

crypto/bn/bn_div.c:205:31: Call
        203.   
        204.       /* First we normalise the numbers */
        205.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                                             ^
        206.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
        207.           goto err;

crypto/bn/bn_lib.c:167:9: Assignment
          165.   
          166.       if (BN_is_zero(a))
          167.           return 0;
                         ^
          168.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
          169.   }

crypto/bn/bn_div.c:205:5: Assignment
        203.   
        204.       /* First we normalise the numbers */
        205.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                   ^
        206.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
        207.           goto err;

crypto/bn/bn_div.c:206:11: Call
        204.       /* First we normalise the numbers */
        205.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
        206.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                         ^
        207.           goto err;
        208.       sdiv->neg = 0;

crypto/bn/bn_shift.c:83:1: <Offset trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `n`
          81.   }
          82.   
          83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
          84.   {
          85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:97:5: Assignment
          95.       }
          96.   
          97.       nw = n / BN_BITS2;
                     ^
          98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
          99.           return (0);

crypto/bn/bn_shift.c:83:1: <Length trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `*r->d`
          81.   }
          82.   
          83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
          84.   {
          85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:98:9: Call
          96.   
          97.       nw = n / BN_BITS2;
          98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                         ^
          99.           return (0);
          100.       r->neg = a->neg;

crypto/bn/bn_lib.c:1016:1: Parameter `*a->d`
            1014.   }
            1015.   
            1016. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
            1017.   {
            1018.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:104:5: Assignment
          102.       rb = BN_BITS2 - lb;
          103.       f = a->d;
          104.       t = r->d;
                     ^
          105.       t[a->top + nw] = 0;
          106.       if (lb == 0)

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