crypto/ec/ec_ameth.c:657: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `o2i_ECPublicKey`.
Showing all 36 steps of the trace


crypto/ec/ec_ameth.c:645:14: Call
643.           if (ecpeer == NULL)
644.               goto err;
645.           if (!EC_KEY_set_group(ecpeer, grp))
                    ^
646.               goto err;
647.       } else {

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:242:10: Call
    240.       if ((t = EC_GROUP_new(a->meth)) == NULL)
    241.           return NULL;
    242.       if (!EC_GROUP_copy(t, a))
                    ^
    243.           goto err;
    244.   

crypto/ec/ec_lib.c:130:1: Parameter `dest->order->top`
      128.   }
      129.   
      130. > int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
      131.   {
      132.       if (dest->meth->group_copy == 0) {

crypto/ec/ec_ameth.c:657:10: Call
655.       if (!p || !plen)
656.           goto err;
657.       if (!o2i_ECPublicKey(&ecpeer, &p, plen))
                ^
658.           goto err;
659.       pkpeer = EVP_PKEY_new();

crypto/ec/ec_asn1.c:1109:1: Parameter `(*a)->group->field->top`
  1107.   }
  1108.   
  1109. > EC_KEY *o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len)
  1110.   {
  1111.       EC_KEY *ret = NULL;

crypto/ec/ec_asn1.c:1121:10: Call
  1119.       }
  1120.       ret = *a;
  1121.       if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
                   ^
  1122.           ECerr(EC_F_O2I_ECPUBLICKEY, ERR_R_EC_LIB);
  1123.           return 0;

crypto/ec/ec_key.c:526:1: Parameter `key->group->field->top`
    524.   }
    525.   
    526. > int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len,
    527.                      BN_CTX *ctx)
    528.   {

crypto/ec/ec_key.c:535:9: Call
    533.       if (key->pub_key == NULL)
    534.           return 0;
    535.       if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
                   ^
    536.           return 0;
    537.       /*

crypto/ec/ec_oct.c:113:1: Parameter `group->field->top`
      111.   }
      112.   
      113. > int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point,
      114.                          const unsigned char *buf, size_t len, BN_CTX *ctx)
      115.   {

crypto/ec/ec_oct.c:135:20: Call
      133.           }
      134.   #else
      135.               return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
                                ^
      136.   #endif
      137.       }

crypto/ec/ec2_oct.c:235:1: Parameter `group->field->top`
        233.    * simple implementation only uses affine coordinates.
        234.    */
        235. > int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point,
        236.                                const unsigned char *buf, size_t len,
        237.                                BN_CTX *ctx)

crypto/ec/ec2_oct.c:304:14: Call
        302.   
        303.       if (form == POINT_CONVERSION_COMPRESSED) {
        304.           if (!EC_POINT_set_compressed_coordinates_GF2m
                            ^
        305.               (group, point, x, y_bit, ctx))
        306.               goto err;

crypto/ec/ec_oct.c:54:1: Parameter `group->field->top`
          52.   
          53.   #ifndef OPENSSL_NO_EC2M
          54. > int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
          55.                                                EC_POINT *point, const BIGNUM *x,
          56.                                                int y_bit, BN_CTX *ctx)

crypto/ec/ec_oct.c:71:20: Call
          69.       if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
          70.           if (group->meth->field_type == NID_X9_62_prime_field)
          71.               return ec_GFp_simple_set_compressed_coordinates(group, point, x,
                                   ^
          72.                                                               y_bit, ctx);
          73.           else

crypto/ec/ecp_oct.c:16:1: Parameter `group->field->top`
            14.   #include "ec_lcl.h"
            15.   
            16. > int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
            17.                                                EC_POINT *point,
            18.                                                const BIGNUM *x_, int y_bit,

crypto/ec/ecp_oct.c:51:10: Call
            49.   
            50.       /* tmp1 := x^3 */
            51.       if (!BN_nnmod(x, x_, group->field, ctx))
                           ^
            52.           goto err;
            53.       if (group->meth->field_decode == 0) {

crypto/bn/bn_mod.c:13:1: Parameter `d->top`
              11.   #include "bn_lcl.h"
              12.   
              13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
              14.   {
              15.       /*

crypto/bn/bn_mod.c:20:11: Call
              18.        */
              19.   
              20.       if (!(BN_mod(r, m, d, ctx)))
                              ^
              21.           return 0;
              22.       if (!r->neg)

crypto/bn/bn_div.c:137:1: Parameter `divisor->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_oct.c:60:14: Call
            58.               goto err;
            59.       } else {
            60.           if (!BN_mod_sqr(tmp2, x_, group->field, ctx))
                               ^
            61.               goto err;
            62.           if (!BN_mod_mul(tmp1, tmp2, x_, group->field, ctx))

crypto/bn/bn_mod.c:102:1: Parameter `m->top`
              100.   }
              101.   
              102. > int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
              103.   {
              104.       if (!BN_sqr(r, a, ctx))

crypto/bn/bn_mod.c:107:12: Call
              105.           return 0;
              106.       /* r->neg == 0,  thus we don't need BN_nnmod */
              107.       return BN_mod(r, r, m, ctx);
                                ^
              108.   }
              109.   

crypto/bn/bn_div.c:199:31: Call
                197.   
                198.       /* First we normalise the numbers */
                199.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                                                     ^
                200.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                201.           goto err;

crypto/bn/bn_lib.c:140:9: Assignment
                  138.   
                  139.       if (BN_is_zero(a))
                  140.           return 0;
                                 ^
                  141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
                  142.   }

crypto/bn/bn_div.c:199:5: Assignment
                197.   
                198.       /* First we normalise the numbers */
                199.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                           ^
                200.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                201.           goto err;

crypto/bn/bn_div.c:200:11: Call
                198.       /* First we normalise the numbers */
                199.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                200.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                                 ^
                201.           goto err;
                202.       sdiv->neg = 0;

crypto/bn/bn_shift.c:83:1: <Offset trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `n`
                  81.   }
                  82.   
                  83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
                  84.   {
                  85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:97:5: Assignment
                  95.       }
                  96.   
                  97.       nw = n / BN_BITS2;
                             ^
                  98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                  99.           return 0;

crypto/bn/bn_shift.c:83:1: <Length trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `*r->d`
                  81.   }
                  82.   
                  83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
                  84.   {
                  85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:98:9: Call
                  96.   
                  97.       nw = n / BN_BITS2;
                  98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                                 ^
                  99.           return 0;
                  100.       r->neg = a->neg;

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

crypto/bn/bn_shift.c:104:5: Assignment
                  102.       rb = BN_BITS2 - lb;
                  103.       f = a->d;
                  104.       t = r->d;
                             ^
                  105.       t[a->top + nw] = 0;
                  106.       if (lb == 0)

crypto/bn/bn_shift.c:112:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `o2i_ECPublicKey` 
                  110.           for (i = a->top - 1; i >= 0; i--) {
                  111.               l = f[i];
                  112.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                                     ^
                  113.               t[nw + i] = (l << lb) & BN_MASK2;
                  114.           }
