crypto/bn/bn_mont.c:125: 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: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: [max(1, mont->N.top), +oo] (⇐ [0, +oo] + [max(1, mont->N.top), mont->N.top]) Size: [0, 8388607]
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]);
