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


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]
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]);
