crypto/bn/bn_exp.c:467: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] (⇐ [0, +oo] + [1, +oo]) Size: [0, 8388607] by call to `BN_to_montgomery`.
Showing all 14 steps of the trace


crypto/bn/bn_exp.c:401:1: Parameter `in_mont->N.top`
399.   }
400.   
401. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
402.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
403.   {

crypto/bn/bn_exp.c:467:10: Call
465.           goto err;
466.       }
467.       if (!BN_to_montgomery(val[0], aa, mont, ctx))
                ^
468.           goto err;               /* 1 */
469.   

crypto/bn/bn_lib.c:996:1: Parameter `mont->N.top`
  994.   }
  995.   
  996. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  997.                        BN_CTX *ctx)
  998.   {

crypto/bn/bn_lib.c:999:12: Call
  997.                        BN_CTX *ctx)
  998.   {
  999.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                     ^
  1000.   }
  1001.   

crypto/bn/bn_mont.c:127:1: Parameter `mont->N.top`
    125.   #endif
    126.   
    127. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    128.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    129.   {

crypto/bn/bn_mont.c:162:10: Call
    160.       /* reduce from aRR to aR */
    161.   #ifdef MONT_WORD
    162.       if (!BN_from_montgomery_word(r, tmp, mont))
                    ^
    163.           goto err;
    164.   #else

crypto/bn/bn_mont.c:205:21: <Offset trace>
203.       n0 = mont->n0[0];
204.   
205.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                           ^
206.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
207.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:205:21: Assignment
      203.       n0 = mont->n0[0];
      204.   
      205.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                                 ^
      206.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
      207.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:176:1: <Length trace>
174.   
175.   #ifdef MONT_WORD
176. > static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
177.   {
178.       BIGNUM *n;

crypto/bn/bn_mont.c:176:1: Parameter `*r->d`
      174.   
      175.   #ifdef MONT_WORD
      176. > static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
      177.   {
      178.       BIGNUM *n;

crypto/bn/bn_mont.c:190:9: Call
      188.   
      189.       max = (2 * nl);             /* carry is stored separately */
      190.       if (bn_wexpand(r, max) == NULL)
                     ^
      191.           return (0);
      192.   

crypto/bn/bn_lib.c:1067:1: Parameter `*a->d`
        1065.   }
        1066.   
        1067. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        1068.   {
        1069.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_mont.c:195:5: Assignment
      193.       r->neg ^= n->neg;
      194.       np = n->d;
      195.       rp = r->d;
                 ^
      196.   
      197.       /* clear the top words of T */

crypto/bn/bn_mont.c:207:26: Array access: Offset: [1, +oo] (⇐ [0, +oo] + [1, +oo]) Size: [0, 8388607] by call to `BN_to_montgomery` 
      205.       for (carry = 0, i = 0; i < nl; i++, rp++) {
      206.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
      207.           v = (v + carry + rp[nl]) & BN_MASK2;
                                      ^
      208.           carry |= (v != rp[nl]);
      209.           carry &= (v <= rp[nl]);
