crypto/ec/ec_ameth.c:727: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `ecdh_cms_set_peerkey`.
Showing all 18 steps of the trace


crypto/ec/ec_ameth.c:727:14: Call
725.           if (!alg || !pubkey)
726.               return 0;
727.           if (!ecdh_cms_set_peerkey(pctx, alg, pubkey)) {
                    ^
728.               ECerr(EC_F_ECDH_CMS_DECRYPT, EC_R_PEER_KEY_ERROR);
729.               return 0;

crypto/ec/ec_ameth.c:568:1: Parameter `pctx->pkey->pkey.ec->group->mont_data->N.top`
  566.   #ifndef OPENSSL_NO_CMS
  567.   
  568. > static int ecdh_cms_set_peerkey(EVP_PKEY_CTX *pctx,
  569.                                   X509_ALGOR *alg, ASN1_BIT_STRING *pubkey)
  570.   {

crypto/ec/ec_ameth.c:593:14: Call
  591.           if (ecpeer == NULL)
  592.               goto err;
  593.           if (!EC_KEY_set_group(ecpeer, grp))
                      ^
  594.               goto err;
  595.       } else {

crypto/ec/ec_key.c:424:1: Parameter `group->mont_data->N.top`
    422.   }
    423.   
    424. > int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group)
    425.   {
    426.       if (key->meth->set_group != NULL && key->meth->set_group(key, group) == 0)

crypto/ec/ec_key.c:429:18: Call
    427.           return 0;
    428.       EC_GROUP_free(key->group);
    429.       key->group = EC_GROUP_dup(group);
                            ^
    430.       return (key->group == NULL) ? 0 : 1;
    431.   }

crypto/ec/ec_lib.c:236:1: Parameter `a->mont_data->N.top`
      234.   }
      235.   
      236. > EC_GROUP *EC_GROUP_dup(const EC_GROUP *a)
      237.   {
      238.       EC_GROUP *t = NULL;

crypto/ec/ec_lib.c:246:10: Call
      244.       if ((t = EC_GROUP_new(a->meth)) == NULL)
      245.           return (NULL);
      246.       if (!EC_GROUP_copy(t, a))
                      ^
      247.           goto err;
      248.   

crypto/ec/ec_lib.c:135:1: Parameter `src->mont_data->N.top`
        133.   }
        134.   
        135. > int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
        136.   {
        137.       if (dest->meth->group_copy == 0) {

crypto/ec/ec_lib.c:186:14: Call
        184.                   return 0;
        185.           }
        186.           if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data))
                            ^
        187.               return 0;
        188.       } else {

crypto/bn/bn_mont.c:381:1: Parameter `from->N.top`
          379.   }
          380.   
          381. > BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from)
          382.   {
          383.       if (to == from)

crypto/bn/bn_mont.c:388:10: Call
          386.       if (!BN_copy(&(to->RR), &(from->RR)))
          387.           return NULL;
          388.       if (!BN_copy(&(to->N), &(from->N)))
                          ^
          389.           return NULL;
          390.       if (!BN_copy(&(to->Ni), &(from->Ni)))

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

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

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

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

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

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:333:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `ecdh_cms_set_peerkey` 
            331.   
            332.       if (b->top > 0)
            333.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                           ^
            334.   
            335.       a->top = b->top;
