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


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

crypto/bn/bn_mont.c:351:14: Call
  349.                   goto err;       /* Ri-- (mod word size) */
  350.           }
  351.           if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
                      ^
  352.               goto err;
  353.           /*

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:160:10: Call
158.       if (one == NULL)
159.           goto err;
160.       if (!BN_to_montgomery(one, BN_value_one(), mont, ctx))
                ^
161.           goto err;
162.   

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

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

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:29:15: Call
    27.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    28.   {
    29.       int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
                        ^
    30.   
    31.       bn_correct_top(r);

crypto/bn/bn_mont.c:37:1: Parameter `*r->d`
      35.   }
      36.   
      37. > int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
      38.                             BN_MONT_CTX *mont, BN_CTX *ctx)
      39.   {

crypto/bn/bn_mont.c:46:13: Call
      44.   #if defined(OPENSSL_BN_ASM_MONT) && defined(MONT_WORD)
      45.       if (num > 1 && a->top == num && b->top == num) {
      46.           if (bn_wexpand(r, num) == NULL)
                        ^
      47.               return 0;
      48.           if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {

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

crypto/bn/bn_lib.c:951:37: Call
        949.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
        950.   {
        951.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                   ^
        952.   }
        953.   

crypto/bn/bn_lib.c:245:1: Parameter `*b->d`
          243.    */
          244.   
          245. > BIGNUM *bn_expand2(BIGNUM *b, int words)
          246.   {
          247.       if (words > b->dmax) {

crypto/bn/bn_lib.c:248:23: Call
          246.   {
          247.       if (words > b->dmax) {
          248.           BN_ULONG *a = bn_expand_internal(b, words);
                                       ^
          249.           if (!a)
          250.               return NULL;

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

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

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

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

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