crypto/bn/bn_mont.c:160: error: BUFFER_OVERRUN_S2
  Offset: [max(1, `mont->N.top`), +oo] (⇐ [0, +oo] + [max(1, `mont->N.top`), `mont->N.top`]) Size: [0, 8388607] by call to `BN_from_montgomery_word`.
Showing all 10 steps of the trace


crypto/bn/bn_mont.c:151:1: Parameter `mont->N.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:160:16: Call
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);
162.   #else                           /* !MONT_WORD */

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

crypto/bn/bn_mont.c:112:21: Assignment
  110.        * includes |carry| which is stored separately.
  111.        */
  112.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                             ^
  113.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  114.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:78:1: <Length trace>
76.   
77.   #ifdef MONT_WORD
78. > static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
79.   {
80.       BIGNUM *n;

crypto/bn/bn_mont.c:78:1: Parameter `*r->d`
  76.   
  77.   #ifdef MONT_WORD
  78. > static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
  79.   {
  80.       BIGNUM *n;

crypto/bn/bn_mont.c:92:9: Call
  90.   
  91.       max = (2 * nl);             /* carry is stored separately */
  92.       if (bn_wexpand(r, max) == NULL)
                ^
  93.           return 0;
  94.   

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_mont.c:97:5: Assignment
  95.       r->neg ^= n->neg;
  96.       np = n->d;
  97.       rp = r->d;
             ^
  98.   
  99.       /* clear the top words of T */

crypto/bn/bn_mont.c:114:26: Array access: Offset: [max(1, mont->N.top), +oo] (⇐ [0, +oo] + [max(1, mont->N.top), mont->N.top]) Size: [0, 8388607] by call to `BN_from_montgomery_word` 
  112.       for (carry = 0, i = 0; i < nl; i++, rp++) {
  113.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  114.           v = (v + carry + rp[nl]) & BN_MASK2;
                                  ^
  115.           carry |= (v != rp[nl]);
  116.           carry &= (v <= rp[nl]);
