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:151:1: Parameter `a->top`
  149.   #endif                          /* MONT_WORD */
  150.   
  151. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
  152.                          BN_CTX *ctx)
  153.   {

crypto/bn/bn_mont.c:159:34: Call
  157.   
  158.       BN_CTX_start(ctx);
  159.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a))
                                          ^
  160.           retn = BN_from_montgomery_word(ret, t, mont);
  161.       BN_CTX_end(ctx);

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

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

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

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

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

crypto/bn/bn_lib.c:942:1: Parameter `*a->d`
      940.   }
      941.   
      942. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      943.   {
      944.       return (words <= a->dmax) ? a : bn_expand2(a, words);

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