crypto/ec/ecp_oct.c:65: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_mod_sqr`.
Showing all 16 steps of the trace


crypto/ec/ecp_oct.c:42:12: Call
40.   
41.       BN_CTX_start(ctx);
42.       tmp1 = BN_CTX_get(ctx);
                 ^
43.       tmp2 = BN_CTX_get(ctx);
44.       x = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       ctx->used++;
  231.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:393:1: Parameter `*a->d`
    391.   }
    392.   
    393. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    394.   {
    395.       bn_check_top(a);

crypto/bn/bn_lib.c:396:9: Call
    394.   {
    395.       bn_check_top(a);
    396.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    397.           return (0);
    398.       a->neg = 0;

crypto/bn/bn_lcl.h:660:1: Parameter `*a->d`
      658.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
      659.   
      660. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      661.   {
      662.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/ec/ecp_oct.c:65:14: Call
63.               goto err;
64.       } else {
65.           if (!BN_mod_sqr(tmp2, x_, group->field, ctx))
                   ^
66.               goto err;
67.           if (!BN_mod_mul(tmp1, tmp2, x_, group->field, ctx))

crypto/bn/bn_mod.c:102:1: Parameter `*r->d`
  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:104:10: Call
  102.   int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
  103.   {
  104.       if (!BN_sqr(r, a, ctx))
                  ^
  105.           return 0;
  106.       /* r->neg == 0,  thus we don't need BN_nnmod */

crypto/bn/bn_sqr.c:17:1: Parameter `*r->d`
    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:39:9: Call
    37.   
    38.       max = 2 * al;               /* Non-zero (from above) */
    39.       if (bn_wexpand(rr, max) == NULL)
                  ^
    40.           goto err;
    41.   

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

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:105:1: <Length trace>
103.   
104.   /* tmp must have 2*n words */
105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
106.   {
107.       int i, j, max;

crypto/bn/bn_sqr.c:105:1: Parameter `*r`
      103.   
      104.   /* tmp must have 2*n words */
      105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
      106.   {
      107.       int i, j, max;

crypto/bn/bn_sqr.c:113:5: Assignment
      111.       max = n * 2;
      112.       ap = a;
      113.       rp = r;
                 ^
      114.       rp[0] = rp[max - 1] = 0;
      115.       rp++;

crypto/bn/bn_sqr.c:114:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_mod_sqr` 
      112.       ap = a;
      113.       rp = r;
      114.       rp[0] = rp[max - 1] = 0;
                 ^
      115.       rp++;
      116.       j = n;
