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


crypto/bn/bn_mont.c:61:11: Call
59.   
60.       BN_CTX_start(ctx);
61.       tmp = BN_CTX_get(ctx);
                ^
62.       if (tmp == NULL)
63.           goto err;

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_mont.c:67:14: Call
65.       bn_check_top(tmp);
66.       if (a == b) {
67.           if (!BN_sqr(tmp, a, ctx))
                   ^
68.               goto err;
69.       } 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:949:1: Parameter `*a->d`
    947.   }
    948.   
    949. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
    950.   {
    951.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_sqr.c:86:5: Call
  84.       rr->neg = 0;
  85.       rr->top = max;
  86.       bn_correct_top(rr);
            ^
  87.       if (r != rr && BN_copy(r, rr) == NULL)
  88.           goto err;

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

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

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

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

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

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