crypto/bn/bn_mod.c:207: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_sqr`.
Showing all 15 steps of the trace


crypto/bn/bn_mod.c:204:14: Call
202.   
203.       BN_CTX_start(ctx);
204.       if ((t = BN_CTX_get(ctx)) == NULL)
                    ^
205.           goto err;
206.       if (a == b) {

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:359:1: Parameter `*a->d`
    357.   }
    358.   
    359. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    360.   {
    361.       bn_check_top(a);

crypto/bn/bn_lib.c:362:9: Call
    360.   {
    361.       bn_check_top(a);
    362.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    363.           return 0;
    364.       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_mod.c:207:14: Call
205.           goto err;
206.       if (a == b) {
207.           if (!BN_sqr(t, a, ctx))
                    ^
208.               goto err;
209.       } else {

crypto/bn/bn_sqr.c:19:15: Call
  17.   int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
  18.   {
  19.       int ret = bn_sqr_fixed_top(r, a, ctx);
                      ^
  20.   
  21.       bn_correct_top(r);

crypto/bn/bn_sqr.c:27:1: Parameter `r->top`
    25.   }
    26.   
    27. > int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
    28.   {
    29.       int max, al;

crypto/bn/bn_sqr.c:21:5: Call
  19.       int ret = bn_sqr_fixed_top(r, a, ctx);
  20.   
  21.       bn_correct_top(r);
            ^
  22.       bn_check_top(r);
  23.   

crypto/bn/bn_lib.c:953:1: <Offset trace>
951.   }
952.   
953. > void bn_correct_top(BIGNUM *a)
954.   {
955.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:953:1: Parameter `a->top`
    951.   }
    952.   
    953. > void bn_correct_top(BIGNUM *a)
    954.   {
    955.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:956:5: Assignment
    954.   {
    955.       BN_ULONG *ftl;
    956.       int tmp_top = a->top;
               ^
    957.   
    958.       if (tmp_top > 0) {

crypto/bn/bn_lib.c:953:1: <Length trace>
951.   }
952.   
953. > void bn_correct_top(BIGNUM *a)
954.   {
955.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:953:1: Parameter `*a->d`
    951.   }
    952.   
    953. > void bn_correct_top(BIGNUM *a)
    954.   {
    955.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:959:14: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_sqr` 
    957.   
    958.       if (tmp_top > 0) {
    959.           for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
                        ^
    960.               ftl--;
    961.               if (*ftl != 0)
