crypto/bn/bn_mod.c:192: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_sqr`.
Showing all 14 steps of the trace


crypto/bn/bn_mod.c:189:14: Call
187.   
188.       BN_CTX_start(ctx);
189.       if ((t = BN_CTX_get(ctx)) == NULL)
                    ^
190.           goto err;
191.       if (a == b) {

crypto/bn/bn_ctx.c:275:5: Call
  273.       }
  274.       /* OK, make sure the returned bignum is "zero" */
  275.       BN_zero(ret);
             ^
  276.       ctx->used++;
  277.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Call
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lcl.h:777:1: Parameter `*a->d`
      775.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
      776.   
      777. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      778.   {
      779.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_mod.c:192:14: Call
190.           goto err;
191.       if (a == b) {
192.           if (!BN_sqr(t, a, ctx))
                    ^
193.               goto err;
194.       } else {

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

crypto/bn/bn_sqr.c:87:9: Call
  85.   
  86.       max = 2 * al;               /* Non-zero (from above) */
  87.       if (bn_wexpand(rr, max) == NULL)
                ^
  88.           goto err;
  89.   

crypto/bn/bn_lib.c:1071:1: Parameter `*a->d`
    1069.   }
    1070.   
    1071. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
    1072.   {
    1073.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_sqr.c:122:17: Call
  120.                   if (bn_wexpand(tmp, max) == NULL)
  121.                       goto err;
  122.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                         ^
  123.               }
  124.           }

crypto/bn/bn_sqr.c:152:1: <Length trace>
150.   
151.   /* tmp must have 2*n words */
152. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
153.   {
154.       int i, j, max;

crypto/bn/bn_sqr.c:152:1: Parameter `*r`
    150.   
    151.   /* tmp must have 2*n words */
    152. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
    153.   {
    154.       int i, j, max;

crypto/bn/bn_sqr.c:160:5: Assignment
    158.       max = n * 2;
    159.       ap = a;
    160.       rp = r;
               ^
    161.       rp[0] = rp[max - 1] = 0;
    162.       rp++;

crypto/bn/bn_sqr.c:161:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_sqr` 
    159.       ap = a;
    160.       rp = r;
    161.       rp[0] = rp[max - 1] = 0;
               ^
    162.       rp++;
    163.       j = n;
