crypto/ec/ecp_mont.c:158: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_to_montgomery`.
Showing all 17 steps of the trace


crypto/ec/ecp_mont.c:151:10: Call
149.       if (mont == NULL)
150.           goto err;
151.       if (!BN_MONT_CTX_set(mont, p, ctx)) {
                ^
152.           ECerr(EC_F_EC_GFP_MONT_GROUP_SET_CURVE, ERR_R_BN_LIB);
153.           goto err;

crypto/bn/bn_mont.c:341:14: Call
  339.                   goto err;       /* Ri-- (mod word size) */
  340.           }
  341.           if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
                      ^
  342.               goto err;
  343.           /*

crypto/bn/bn_div.c:137:1: Parameter `rm->top`
    135.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    136.    */
    137. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    138.              BN_CTX *ctx)
    139.   {

crypto/ec/ecp_mont.c:158:10: Call
156.       if (one == NULL)
157.           goto err;
158.       if (!BN_to_montgomery(one, BN_value_one(), mont, ctx))
                ^
159.           goto err;
160.   

crypto/bn/bn_lib.c:869:1: Parameter `*r->d`
  867.   }
  868.   
  869. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  870.                        BN_CTX *ctx)
  871.   {

crypto/bn/bn_lib.c:872:12: Call
  870.                        BN_CTX *ctx)
  871.   {
  872.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                    ^
  873.   }
  874.   

crypto/bn/bn_mont.c:26:1: Parameter `*r->d`
    24.   #endif
    25.   
    26. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    27.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    28.   {

crypto/bn/bn_mont.c:35:13: Call
    33.   
    34.       if (num > 1 && a->top == num && b->top == num) {
    35.           if (bn_wexpand(r, num) == NULL)
                      ^
    36.               return 0;
    37.           if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {

crypto/bn/bn_lib.c:940:1: Parameter `*a->d`
      938.   }
      939.   
      940. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      941.   {
      942.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:942:37: Call
      940.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
      941.   {
      942.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                 ^
      943.   }
      944.   

crypto/bn/bn_lib.c:273:1: Parameter `*b->d`
        271.    */
        272.   
        273. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        274.   {
        275.       bn_check_top(b);

crypto/bn/bn_lib.c:278:23: Call
        276.   
        277.       if (words > b->dmax) {
        278.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        279.           if (!a)
        280.               return NULL;

crypto/bn/bn_lib.c:235:1: <Offset trace>
233.   /* This is used by bn_expand2() */
234.   /* The caller MUST check that words > b->dmax before calling this */
235. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
236.   {
237.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:235:1: Parameter `b->top`
          233.   /* This is used by bn_expand2() */
          234.   /* The caller MUST check that words > b->dmax before calling this */
          235. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          236.   {
          237.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:235:1: <Length trace>
233.   /* This is used by bn_expand2() */
234.   /* The caller MUST check that words > b->dmax before calling this */
235. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
236.   {
237.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:235:1: Parameter `*b->d`
          233.   /* This is used by bn_expand2() */
          234.   /* The caller MUST check that words > b->dmax before calling this */
          235. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          236.   {
          237.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:260:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_to_montgomery` 
          258.       assert(b->top <= words);
          259.       if (b->top > 0)
          260.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          261.   
          262.       return a;
