crypto/ec/ec_asn1.c:770: error: BUFFER_OVERRUN_L3
  Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `EC_POINT_oct2point`.
Showing all 58 steps of the trace


crypto/ec/ec_asn1.c:606:9: Call
604.           goto err;
605.       }
606.       a = BN_bin2bn(params->curve->a->data, params->curve->a->length, NULL);
               ^
607.       if (a == NULL) {
608.           ECerr(EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS, ERR_R_BN_LIB);

crypto/bn/bn_lib.c:388:9: Assignment
  386.       n = len;
  387.       if (n == 0) {
  388.           ret->top = 0;
                 ^
  389.           return ret;
  390.       }

crypto/ec/ec_asn1.c:666:18: Call
664.               if (!BN_set_bit(p, (int)tmp_long))
665.                   goto err;
666.               if (!BN_set_bit(p, 0))
                        ^
667.                   goto err;
668.           } else if (tmp == NID_X9_62_ppBasis) {

crypto/bn/bn_lib.c:588:1: Parameter `a->top`
  586.   }
  587.   
  588. > int BN_set_bit(BIGNUM *a, int n)
  589.   {
  590.       int i, j, k;

crypto/ec/ec_asn1.c:770:10: Call
768.   
769.       /* extract the ec point */
770.       if (!EC_POINT_oct2point(ret, point, params->base->data,
                ^
771.                               params->base->length, NULL)) {
772.           ECerr(EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS, ERR_R_EC_LIB);

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:101:10: Call
        99.       }
        100.   
        101.       if (!BN_mod_sqrt(y, tmp1, group->field, ctx)) {
                        ^
        102.           unsigned long err = ERR_peek_last_error();
        103.   

crypto/bn/bn_sqrt.c:13:1: Parameter `p->top`
          11.   #include "bn_lcl.h"
          12.   
          13. > BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
          14.   /*
          15.    * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks

crypto/bn/bn_sqrt.c:26:10: Call
          24.       int e, i, j;
          25.   
          26.       if (!BN_is_odd(p) || BN_abs_is_word(p, 1)) {
                         ^
          27.           if (BN_abs_is_word(p, 2)) {
          28.               if (ret == NULL)

crypto/bn/bn_lib.c:861:1: Parameter `a->top`
            859.   }
            860.   
            861. > int BN_is_odd(const BIGNUM *a)
            862.   {
            863.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_sqrt.c:26:26: Call
          24.       int e, i, j;
          25.   
          26.       if (!BN_is_odd(p) || BN_abs_is_word(p, 1)) {
                                         ^
          27.           if (BN_abs_is_word(p, 2)) {
          28.               if (ret == NULL)

crypto/bn/bn_lib.c:841:1: Parameter `a->top`
            839.   }
            840.   
            841. > int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
            842.   {
            843.       return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));

crypto/bn/bn_sqrt.c:75:10: Call
          73.   
          74.       /* A = a mod p */
          75.       if (!BN_nnmod(A, a, p, ctx))
                         ^
          76.           goto end;
          77.   

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/bn/bn_sqrt.c:80:13: Call
          78.       /* now write  |p| - 1  as  2^e*q  where  q  is odd */
          79.       e = 1;
          80.       while (!BN_is_bit_set(p, e))
                            ^
          81.           e++;
          82.       /* we'll set  q  later (if needed) */

crypto/bn/bn_lib.c:629:1: Parameter `a->top`
            627.   }
            628.   
            629. > int BN_is_bit_set(const BIGNUM *a, int n)
            630.   {
            631.       int i, j;

crypto/bn/bn_sqrt.c:93:14: Call
          91.            * so we can use exponent  (|p|+1)/4,  i.e.  (|p|-3)/4 + 1.
          92.            */
          93.           if (!BN_rshift(q, p, 2))
                             ^
          94.               goto end;
          95.           q->neg = 0;

crypto/bn/bn_shift.c:122:1: Parameter `a->top`
            120.   }
            121.   
            122. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
            123.   {
            124.       int i, j, nw, lb, rb;

crypto/bn/bn_sqrt.c:98:14: Call
          96.           if (!BN_add_word(q, 1))
          97.               goto end;
          98.           if (!BN_mod_exp(ret, A, q, p, ctx))
                              ^
          99.               goto end;
          100.           err = 0;

crypto/bn/bn_exp.c:89:1: Parameter `m->top`
            87.   }
            88.   
            89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
            90.                  BN_CTX *ctx)
            91.   {

crypto/bn/bn_exp.c:134:9: Call
            132.   
            133.   #ifdef MONT_MUL_MOD
            134.       if (BN_is_odd(m)) {
                           ^
            135.   # ifdef MONT_EXP_WORD
            136.           if (a->top == 1 && !a->neg

crypto/bn/bn_lib.c:861:1: Parameter `a->top`
              859.   }
              860.   
              861. > int BN_is_odd(const BIGNUM *a)
              862.   {
              863.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:144:19: Call
            142.           } else
            143.   # endif
            144.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                                     ^
            145.       } else
            146.   #endif

crypto/bn/bn_exp.c:296:1: Parameter `m->top`
              294.   }
              295.   
              296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
              297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
              298.   {

crypto/bn/bn_exp.c:310:16: Call
              308.               || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
              309.               || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) {
              310.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                                    ^
              311.       }
              312.   

crypto/bn/bn_exp.c:745:14: Assignment
                743.           /* 2^(top*BN_BITS2) - m */
                744.           tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
                745.           for (i = 1; i < top; i++)
                                    ^
                746.               tmp.d[i] = (~m->d[i]) & BN_MASK2;
                747.           tmp.top = top;

crypto/bn/bn_exp.c:1062:14: Call
                1060.           bits -= window0;
                1061.           wvalue = bn_get_bits(p, bits) & wmask;
                1062.           if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
                                     ^
                1063.                                               window))
                1064.               goto err;

crypto/bn/bn_exp.c:520:1: Parameter `top`
                  518.   }
                  519.   
                  520. > static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top,
                  521.                                             unsigned char *buf, int idx,
                  522.                                             int window)

crypto/bn/bn_exp.c:577:5: Assignment
                  575.       }
                  576.   
                  577.       b->top = top;
                             ^
                  578.       bn_correct_top(b);
                  579.       return 1;

crypto/bn/bn_exp.c:578:5: Call
                  576.   
                  577.       b->top = top;
                  578.       bn_correct_top(b);
                             ^
                  579.       return 1;
                  580.   }

crypto/bn/bn_lib.c:947:1: Parameter `a->top`
                    945.   }
                    946.   
                    947. > void bn_correct_top(BIGNUM *a)
                    948.   {
                    949.       BN_ULONG *ftl;

crypto/bn/bn_exp.c:1075:22: Call
                1073.               /* Square the result window-size times */
                1074.               for (i = 0; i < window; i++)
                1075.                   if (!BN_mod_mul_montgomery(&tmp, &tmp, &tmp, mont, ctx))
                                             ^
                1076.                       goto err;
                1077.   

crypto/bn/bn_mont.c:26:1: Parameter `b->top`
                  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:56:14: Call
                  54.       bn_check_top(tmp);
                  55.       if (a == b) {
                  56.           if (!BN_sqr(tmp, a, ctx))
                                     ^
                  57.               goto err;
                  58.       } else {

crypto/bn/bn_sqr.c:17:1: Parameter `a->top`
                    15.    * I've just gone over this and it is now %20 faster on x86 - eay - 27 Jun 96
                    16.    */
                    17. > int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
                    18.   {
                    19.       int max, al;

crypto/bn/bn_sqr.c:25:5: Assignment
                    23.       bn_check_top(a);
                    24.   
                    25.       al = a->top;
                              ^
                    26.       if (al <= 0) {
                    27.           r->top = 0;

crypto/bn/bn_sqr.c:74:17: Call
                    72.                   if (bn_wexpand(tmp, max) == NULL)
                    73.                       goto err;
                    74.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                                          ^
                    75.               }
                    76.           }

crypto/bn/bn_sqr.c:99:1: <Offset trace>
97.   
98.   /* tmp must have 2*n words */
99. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
100.   {
101.       int i, j, max;

crypto/bn/bn_sqr.c:99:1: Parameter `n`
                      97.   
                      98.   /* tmp must have 2*n words */
                      99. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                      100.   {
                      101.       int i, j, max;

crypto/bn/bn_sqr.c:110:5: Assignment
                      108.       rp[0] = rp[max - 1] = 0;
                      109.       rp++;
                      110.       j = n;
                                 ^
                      111.   
                      112.       if (--j > 0) {

crypto/bn/bn_sqr.c:112:9: Assignment
                      110.       j = n;
                      111.   
                      112.       if (--j > 0) {
                                     ^
                      113.           ap++;
                      114.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:99:1: <Length trace>
97.   
98.   /* tmp must have 2*n words */
99. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
100.   {
101.       int i, j, max;

crypto/bn/bn_sqr.c:99:1: Parameter `*r`
                      97.   
                      98.   /* tmp must have 2*n words */
                      99. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                      100.   {
                      101.       int i, j, max;

crypto/bn/bn_sqr.c:107:5: Assignment
                      105.       max = n * 2;
                      106.       ap = a;
                      107.       rp = r;
                                 ^
                      108.       rp[0] = rp[max - 1] = 0;
                      109.       rp++;

crypto/bn/bn_sqr.c:109:5: Assignment
                      107.       rp = r;
                      108.       rp[0] = rp[max - 1] = 0;
                      109.       rp++;
                                 ^
                      110.       j = n;
                      111.   

crypto/bn/bn_sqr.c:114:9: Array access: Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `EC_POINT_oct2point` 
                      112.       if (--j > 0) {
                      113.           ap++;
                      114.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
                                     ^
                      115.           rp += 2;
                      116.       }
