crypto/bn/bn_exp.c:1113: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_from_montgomery`.
Showing all 15 steps of the trace


crypto/bn/bn_exp.c:1058:14: Call
1056.           bits -= window0;
1057.           wvalue = bn_get_bits(p, bits) & wmask;
1058.           if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
                     ^
1059.                                               window))
1060.               goto err;

crypto/bn/bn_exp.c:516:1: Parameter `top`
  514.   }
  515.   
  516. > static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top,
  517.                                             unsigned char *buf, int idx,
  518.                                             int window)

crypto/bn/bn_exp.c:573:5: Assignment
  571.       }
  572.   
  573.       b->top = top;
             ^
  574.       b->flags |= BN_FLG_FIXED_TOP;
  575.       return 1;

crypto/bn/bn_exp.c:1113:10: Call
1111.       } else
1112.   #endif
1113.       if (!BN_from_montgomery(rr, &tmp, mont, ctx))
                 ^
1114.           goto err;
1115.       ret = 1;

crypto/bn/bn_mont.c:162:1: Parameter `a->top`
  160.   #endif                          /* MONT_WORD */
  161.   
  162. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
  163.                          BN_CTX *ctx)
  164.   {

crypto/bn/bn_mont.c:167:12: Call
  165.       int retn;
  166.   
  167.       retn = bn_from_mont_fixed_top(ret, a, mont, ctx);
                    ^
  168.       bn_correct_top(ret);
  169.       bn_check_top(ret);

crypto/bn/bn_mont.c:174:1: Parameter `a->top`
    172.   }
    173.   
    174. > int bn_from_mont_fixed_top(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
    175.                              BN_CTX *ctx)
    176.   {

crypto/bn/bn_mont.c:182:34: Call
    180.   
    181.       BN_CTX_start(ctx);
    182.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
                                            ^
    183.           retn = bn_from_montgomery_word(ret, t, mont);
    184.       }

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `b->top`
      279.   }
      280.   
      281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      282.   {
      283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `*a->d`
      279.   }
      280.   
      281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      282.   {
      283.       bn_check_top(b);

crypto/bn/bn_lib.c:287:9: Call
      285.       if (a == b)
      286.           return a;
      287.       if (bn_wexpand(a, b->top) == NULL)
                     ^
      288.           return NULL;
      289.   

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

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_from_montgomery` 
      289.   
      290.       if (b->top > 0)
      291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                     ^
      292.   
      293.       a->neg = b->neg;
