test/bntest.c:428: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] (⇐ [0, +oo] + [1, +oo]) Size: [0, 8388607] by call to `BN_mod_mul_montgomery`.
Showing all 15 steps of the trace


test/bntest.c:427:5: Call
425.           "D81FDC7C54E02B60262B241D53C040E99E45826ECA37A804668E690E1AFC1CA4"
426.           "2C9A15D84D4954425F0B7642FC0BD9D7B24E2618D2DCC9B729D944BADACFDDAF");
427.       BN_MONT_CTX_set(mont, n, ctx);
           ^
428.       BN_mod_mul_montgomery(c, a, b, mont, ctx);
429.       BN_mod_mul_montgomery(d, b, a, mont, ctx);

crypto/bn/bn_mont.c:251:1: Parameter `mont->N.top`
  249.   }
  250.   
  251. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
  252.   {
  253.       int i, ret = 0;

test/bntest.c:428:5: Call
426.           "2C9A15D84D4954425F0B7642FC0BD9D7B24E2618D2DCC9B729D944BADACFDDAF");
427.       BN_MONT_CTX_set(mont, n, ctx);
428.       BN_mod_mul_montgomery(c, a, b, mont, ctx);
           ^
429.       BN_mod_mul_montgomery(d, b, a, mont, ctx);
430.       if (!TEST_BN_eq(c, d))

crypto/bn/bn_mont.c:26:1: Parameter `mont->N.top`
  24.   #endif
  25.   
  26. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
  27.                             BN_MONT_CTX *mont, BN_CTX *ctx)
  28.   {

crypto/bn/bn_mont.c:29:15: Call
  27.                             BN_MONT_CTX *mont, BN_CTX *ctx)
  28.   {
  29.       int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
                      ^
  30.   
  31.       bn_correct_top(r);

crypto/bn/bn_mont.c:37:1: Parameter `mont->N.top`
    35.   }
    36.   
    37. > int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    38.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    39.   {

crypto/bn/bn_mont.c:75:10: Call
    73.       /* reduce from aRR to aR */
    74.   #ifdef MONT_WORD
    75.       if (!bn_from_montgomery_word(r, tmp, mont))
                   ^
    76.           goto err;
    77.   #else

crypto/bn/bn_mont.c:123:21: <Offset trace>
121.        * includes |carry| which is stored separately.
122.        */
123.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                           ^
124.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
125.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:123:21: Assignment
      121.        * includes |carry| which is stored separately.
      122.        */
      123.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                                 ^
      124.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
      125.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:88:1: <Length trace>
86.   
87.   #ifdef MONT_WORD
88. > static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
89.   {
90.       BIGNUM *n;

crypto/bn/bn_mont.c:88:1: Parameter `*r->d`
      86.   
      87.   #ifdef MONT_WORD
      88. > static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
      89.   {
      90.       BIGNUM *n;

crypto/bn/bn_mont.c:102:9: Call
      100.   
      101.       max = (2 * nl);             /* carry is stored separately */
      102.       if (bn_wexpand(r, max) == NULL)
                     ^
      103.           return 0;
      104.   

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_mont.c:107:5: Assignment
      105.       r->neg ^= n->neg;
      106.       np = n->d;
      107.       rp = r->d;
                 ^
      108.   
      109.       /* clear the top words of T */

crypto/bn/bn_mont.c:125:26: Array access: Offset: [1, +oo] (⇐ [0, +oo] + [1, +oo]) Size: [0, 8388607] by call to `BN_mod_mul_montgomery` 
      123.       for (carry = 0, i = 0; i < nl; i++, rp++) {
      124.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
      125.           v = (v + carry + rp[nl]) & BN_MASK2;
                                      ^
      126.           carry |= (v != rp[nl]);
      127.           carry &= (v <= rp[nl]);
