test/bntest.c:993: error: BUFFER_OVERRUN_L3
  Offset: [8, +oo] (⇐ [8, +oo] + [0, +oo]) Size: [0, 8388607] by call to `BN_mod_exp`.
Showing all 23 steps of the trace


test/bntest.c:990:5: Call
988.       e = BN_new();
989.   
990.       BN_one(a);
           ^
991.       BN_one(b);
992.       BN_zero(c);

crypto/bn/bn_lib.c:530:1: Parameter `*a->d`
  528.   }
  529.   
  530. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  531.   {
  532.       bn_check_top(a);

test/bntest.c:993:9: Call
991.       BN_one(b);
992.       BN_zero(c);
993.       if (BN_mod_exp(d, a, b, c, ctx)) {
               ^
994.           fprintf(stderr, "BN_mod_exp with zero modulus succeeded!\n");
995.           return 0;

crypto/bn/bn_exp.c:191:1: Parameter `*a->d`
  189.   }
  190.   
  191. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  192.                  BN_CTX *ctx)
  193.   {

crypto/bn/bn_exp.c:251:19: Call
  249.           } else
  250.   # endif
  251.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                           ^
  252.       } else
  253.   #endif

crypto/bn/bn_exp.c:401:1: Parameter `*a->d`
    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:924:1: Parameter `*a->d`
      922.   }
      923.   
      924. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
      925.                        BN_CTX *ctx)
      926.   {

crypto/bn/bn_lib.c:927:12: Call
      925.                        BN_CTX *ctx)
      926.   {
      927.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                        ^
      928.   }
      929.   

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

crypto/bn/bn_mont.c:158:14: Call
        156.               goto err;
        157.       } else {
        158.           if (!BN_mul(tmp, a, b, ctx))
                            ^
        159.               goto err;
        160.       }

crypto/bn/bn_mul.c:883:1: Parameter `*a->d`
          881.   #endif                          /* BN_RECURSION */
          882.   
          883. > int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
          884.   {
          885.       int ret = 0;

crypto/bn/bn_mul.c:964:17: Call
          962.                   if (bn_wexpand(rr, k * 4) == NULL)
          963.                       goto err;
          964.                   bn_mul_part_recursive(rr->d, a->d, b->d,
                                 ^
          965.                                         j, al - j, bl - j, t->d);
          966.               } else {            /* al <= j || bl <= j */

crypto/bn/bn_mul.c:534:1: Parameter `n`
            532.    */
            533.   /* tnX may not be negative but less than n */
            534. > void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
            535.                              int tna, int tnb, BN_ULONG *t)
            536.   {

crypto/bn/bn_mul.c:547:10: Call
            545.   
            546.       /* r=(a[0]-a[1])*(b[1]-b[0]) */
            547.       c1 = bn_cmp_part_words(a, &(a[n]), tna, n - tna);
                            ^
            548.       c2 = bn_cmp_part_words(&(b[n]), b, tnb, tnb - n);
            549.       neg = 0;

crypto/bn/bn_lib.c:782:1: Parameter `cl`
              780.    */
              781.   
              782. > int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, int cl, int dl)
              783.   {
              784.       int n, i;

crypto/bn/bn_lib.c:799:12: Call
              797.           }
              798.       }
              799.       return bn_cmp_words(a, b, cl);
                                ^
              800.   }
              801.   

crypto/bn/bn_lib.c:755:1: <Offset trace>
753.   }
754.   
755. > int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
756.   {
757.       int i;

crypto/bn/bn_lib.c:755:1: Parameter `n`
                753.   }
                754.   
                755. > int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
                756.   {
                757.       int i;

crypto/bn/bn_lib.c:764:10: Assignment
                762.       if (aa != bb)
                763.           return ((aa > bb) ? 1 : -1);
                764.       for (i = n - 2; i >= 0; i--) {
                                ^
                765.           aa = a[i];
                766.           bb = b[i];

crypto/bn/bn_lib.c:755:1: <Length trace>
753.   }
754.   
755. > int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
756.   {
757.       int i;

crypto/bn/bn_lib.c:755:1: Parameter `*b`
                753.   }
                754.   
                755. > int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
                756.   {
                757.       int i;

crypto/bn/bn_lib.c:766:14: Array access: Offset: [8, +oo] (⇐ [8, +oo] + [0, +oo]) Size: [0, 8388607] by call to `BN_mod_exp` 
                764.       for (i = n - 2; i >= 0; i--) {
                765.           aa = a[i];
                766.           bb = b[i];
                                    ^
                767.           if (aa != bb)
                768.               return ((aa > bb) ? 1 : -1);
