test/bntest.c:2048: error: BUFFER_OVERRUN_L3
  Offset added: 8 Size: [0, 536870848] by call to `BN_mod_exp`.
Showing all 16 steps of the trace


test/bntest.c:2048:33: Call
2046.       BN_zero(zero);
2047.   
2048.       if (!BN_mod_exp(r, a, zero, BN_value_one(), NULL)
                                        ^
2049.               || !BN_is_zero(r)
2050.               || !BN_mod_exp_mont(r, a, zero, BN_value_one(), NULL, NULL)

crypto/bn/bn_lib.c:84:9: Assignment
  82.       static const BN_ULONG data_one = 1L;
  83.       static const BIGNUM const_one =
  84.           { (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA };
                ^
  85.   
  86.       return (&const_one);

test/bntest.c:2048:10: Call
2046.       BN_zero(zero);
2047.   
2048.       if (!BN_mod_exp(r, a, zero, BN_value_one(), NULL)
                 ^
2049.               || !BN_is_zero(r)
2050.               || !BN_mod_exp_mont(r, a, zero, BN_value_one(), NULL, NULL)

crypto/bn/bn_exp.c:91:1: Parameter `m->top`
  89.   }
  90.   
  91. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  92.                  BN_CTX *ctx)
  93.   {

crypto/bn/bn_exp.c:136:9: Call
  134.   
  135.   #ifdef MONT_MUL_MOD
  136.       if (BN_is_odd(m)) {
                 ^
  137.   # ifdef MONT_EXP_WORD
  138.           if (a->top == 1 && !a->neg

crypto/bn/bn_lib.c:865:1: Parameter `a->top`
    863.   }
    864.   
    865. > int BN_is_odd(const BIGNUM *a)
    866.   {
    867.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:149:15: Call
  147.   #ifdef RECP_MUL_MOD
  148.       {
  149.           ret = BN_mod_exp_recp(r, a, p, m, ctx);
                       ^
  150.       }
  151.   #else

crypto/bn/bn_exp.c:161:1: Parameter `m->top`
    159.   }
    160.   
    161. > int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
    162.                       const BIGNUM *m, BN_CTX *ctx)
    163.   {

crypto/bn/bn_exp.c:198:14: Call
    196.       if (m->neg) {
    197.           /* ignore sign of 'm' */
    198.           if (!BN_copy(aa, m))
                        ^
    199.               goto err;
    200.           aa->neg = 0;

crypto/bn/bn_lib.c:322:1: <Offset trace>
320.   }
321.   
322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
323.   {
324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: Parameter `b->top`
      320.   }
      321.   
      322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      323.   {
      324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: <Length trace>
320.   }
321.   
322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
323.   {
324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: Parameter `*a->d`
      320.   }
      321.   
      322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      323.   {
      324.       bn_check_top(b);

crypto/bn/bn_lib.c:328:9: Call
      326.       if (a == b)
      327.           return a;
      328.       if (bn_wexpand(a, b->top) == NULL)
                     ^
      329.           return NULL;
      330.   

crypto/bn/bn_lib.c:946:1: Parameter `*a->d`
        944.   }
        945.   
        946. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        947.   {
        948.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:331:5: Array access: Offset added: 8 Size: [0, 536870848] by call to `BN_mod_exp` 
      329.           return NULL;
      330.   
      331.       memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                 ^
      332.   
      333.       a->top = b->top;
