crypto/bn/bn_mont.c:473: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_div`.
Showing all 21 steps of the trace


crypto/bn/bn_mont.c:357:15: Call
355.   
356.       BN_CTX_start(ctx);
357.       if ((Ri = BN_CTX_get(ctx)) == NULL)
                     ^
358.           goto err;
359.       R = &(mont->RR);            /* grab RR as a temp */

crypto/bn/bn_ctx.c:283:5: Call
  281.       }
  282.       /* OK, make sure the returned bignum is "zero" */
  283.       BN_zero(ret);
             ^
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_mont.c:427:14: Call
425.           tmod.top = buf[0] != 0 ? 1 : 0;
426.           /* Ri = R^-1 mod N */
427.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                    ^
428.               goto err;
429.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:225:1: Parameter `*in->d`
  223.                                           BN_CTX *ctx);
  224.   
  225. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  226.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  227.   {

crypto/bn/bn_gcd.c:230:10: Call
  228.       BIGNUM *rv;
  229.       int noinv;
  230.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  231.       if (noinv)
  232.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:281:14: Call
    279.       A->neg = 0;
    280.       if (B->neg || (BN_ucmp(B, A) >= 0)) {
    281.           if (!BN_nnmod(B, B, A, ctx))
                        ^
    282.               goto err;
    283.       }

crypto/bn/bn_mod.c:125:11: Call
      123.        */
      124.   
      125.       if (!(BN_mod(r, m, d, ctx)))
                       ^
      126.           return 0;
      127.       if (!r->neg)

crypto/bn/bn_div.c:188:1: Parameter `*dv->d`
        186.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
        187.    */
        188. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
        189.              BN_CTX *ctx)
        190.   {

crypto/bn/bn_mont.c:439:14: Call
437.                   goto err;       /* Ri-- (mod word size) */
438.           }
439.           if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
                    ^
440.               goto err;
441.           /*

crypto/bn/bn_div.c:188:1: Parameter `*rm->d`
  186.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
  187.    */
  188. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  189.              BN_CTX *ctx)
  190.   {

crypto/bn/bn_mont.c:473:10: Call
471.       if (!BN_set_bit(&(mont->RR), mont->ri * 2))
472.           goto err;
473.       if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx))
                ^
474.           goto err;
475.   

crypto/bn/bn_div.c:242:11: Call
  240.   
  241.       BN_CTX_start(ctx);
  242.       tmp = BN_CTX_get(ctx);
                   ^
  243.       snum = BN_CTX_get(ctx);
  244.       sdiv = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:283:5: Call
    281.       }
    282.       /* OK, make sure the returned bignum is "zero" */
    283.       BN_zero(ret);
               ^
    284.       ctx->used++;
    285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
      518.   }
      519.   
      520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
      521.   {
      522.       bn_check_top(a);

crypto/bn/bn_div.c:453:9: Call
  451.            */
  452.           int neg = num->neg;
  453.           BN_rshift(rm, snum, norm_shift);
                 ^
  454.           if (!BN_is_zero(rm))
  455.               rm->neg = neg;

crypto/bn/bn_shift.c:168:1: <Length trace>
166.   }
167.   
168. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
169.   {
170.       int i, j, nw, lb, rb;

crypto/bn/bn_shift.c:168:1: Parameter `*a->d`
    166.   }
    167.   
    168. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
    169.   {
    170.       int i, j, nw, lb, rb;

crypto/bn/bn_shift.c:199:5: Assignment
    197.       }
    198.   
    199.       f = &(a->d[nw]);
               ^
    200.       t = r->d;
    201.       j = a->top - nw;

crypto/bn/bn_shift.c:208:15: Assignment
    206.               *(t++) = *(f++);
    207.       } else {
    208.           l = *(f++);
                         ^
    209.           for (i = j - 1; i != 0; i--) {
    210.               tmp = (l >> rb) & BN_MASK2;

crypto/bn/bn_shift.c:211:17: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_div` 
    209.           for (i = j - 1; i != 0; i--) {
    210.               tmp = (l >> rb) & BN_MASK2;
    211.               l = *(f++);
                           ^
    212.               *(t++) = (tmp | (l << lb)) & BN_MASK2;
    213.           }
