crypto/ec/ecp_mont.c:163: 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:156:10: Call
154.       if (mont == NULL)
155.           goto err;
156.       if (!BN_MONT_CTX_set(mont, p, ctx)) {
                ^
157.           ECerr(EC_F_EC_GFP_MONT_GROUP_SET_CURVE, ERR_R_BN_LIB);
158.           goto err;

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

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

crypto/ec/ecp_mont.c:163:10: Call
161.       if (one == NULL)
162.           goto err;
163.       if (!BN_to_montgomery(one, BN_value_one(), mont, ctx))
                ^
164.           goto err;
165.   

crypto/bn/bn_lib.c:877:1: Parameter `*r->d`
  875.   }
  876.   
  877. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  878.                        BN_CTX *ctx)
  879.   {

crypto/bn/bn_lib.c:880:12: Call
  878.                        BN_CTX *ctx)
  879.   {
  880.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                    ^
  881.   }
  882.   

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: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:950:37: Call
      948.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
      949.   {
      950.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                 ^
      951.   }
      952.   

crypto/bn/bn_lib.c:284:1: Parameter `*b->d`
        282.    */
        283.   
        284. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        285.   {
        286.       bn_check_top(b);

crypto/bn/bn_lib.c:289:23: Call
        287.   
        288.       if (words > b->dmax) {
        289.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        290.           if (!a)
        291.               return NULL;

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

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

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

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

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