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


crypto/bn/bn_recp.c:62:14: Call
60.   
61.       BN_CTX_start(ctx);
62.       if ((a = BN_CTX_get(ctx)) == NULL)
                   ^
63.           goto err;
64.       if (y != NULL) {

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/bn/bn_recp.c:66:18: Call
64.       if (y != NULL) {
65.           if (x == y) {
66.               if (!BN_sqr(a, x, ctx))
                       ^
67.                   goto err;
68.           } else {

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_sqr` 
    112.       ap = a;
    113.       rp = r;
    114.       rp[0] = rp[max - 1] = 0;
               ^
    115.       rp++;
    116.       j = n;
