test/bntest.c:1445: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_from_montgomery`.
Showing all 12 steps of the trace


test/bntest.c:1427:10: Call
1425.           goto err;
1426.   
1427.       if (!TEST_true(BN_mod_mul(ret, a, b, m, ctx))
                 ^
1428.               || !equalBN("A * B (mod M)", mod_mul, ret))
1429.           goto err;

crypto/bn/bn_mod.c:73:1: Parameter `r->top`
  71.   
  72.   /* slow but works */
  73. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  74.                  BN_CTX *ctx)
  75.   {

test/bntest.c:1445:21: Call
1443.                   || !TEST_true(BN_mod_mul_montgomery(ret, a_tmp, b_tmp,
1444.                                                       mont, ctx))
1445.                   || !TEST_true(BN_from_montgomery(ret, ret, mont, ctx))
                            ^
1446.                   || !equalBN("A * B (mod M) (mont)", mod_mul, ret))
1447.               st = 0;

crypto/bn/bn_mont.c:160:1: Parameter `a->top`
  158.   #endif                          /* MONT_WORD */
  159.   
  160. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
  161.                          BN_CTX *ctx)
  162.   {

crypto/bn/bn_mont.c:168:34: Call
  166.   
  167.       BN_CTX_start(ctx);
  168.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
                                          ^
  169.           retn = bn_from_montgomery_word(ret, t, mont);
  170.           bn_correct_top(ret);

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `b->top`
    279.   }
    280.   
    281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    282.   {
    283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `*a->d`
    279.   }
    280.   
    281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    282.   {
    283.       bn_check_top(b);

crypto/bn/bn_lib.c:287:9: Call
    285.       if (a == b)
    286.           return a;
    287.       if (bn_wexpand(a, b->top) == NULL)
                   ^
    288.           return NULL;
    289.   

crypto/bn/bn_lib.c:949:1: Parameter `*a->d`
      947.   }
      948.   
      949. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      950.   {
      951.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_from_montgomery` 
    289.   
    290.       if (b->top > 0)
    291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                   ^
    292.   
    293.       a->neg = b->neg;
