crypto/ec/ecp_smpl.c:696: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_mod_sub_quick`.
Showing all 15 steps of the trace


crypto/ec/ecp_smpl.c:635:10: Call
633.   
634.       BN_CTX_start(ctx);
635.       n0 = BN_CTX_get(ctx);
                ^
636.       n1 = BN_CTX_get(ctx);
637.       n2 = 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:358:1: Parameter `*a->d`
    356.   }
    357.   
    358. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    359.   {
    360.       bn_check_top(a);

crypto/bn/bn_lib.c:361:9: Call
    359.   {
    360.       bn_check_top(a);
    361.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    362.           return 0;
    363.       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_smpl.c:696:10: Call
694.   
695.       /* n5, n6 */
696.       if (!BN_mod_sub_quick(n5, n1, n3, p))
                ^
697.           goto end;
698.       if (!BN_mod_sub_quick(n6, n2, n4, p))

crypto/bn/bn_mod.c:62:1: Parameter `*r->d`
  60.    * less than m
  61.    */
  62. > int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
  63.                        const BIGNUM *m)
  64.   {

crypto/bn/bn_mod.c:65:10: Call
  63.                        const BIGNUM *m)
  64.   {
  65.       if (!BN_sub(r, a, b))
                 ^
  66.           return 0;
  67.       if (r->neg)

crypto/bn/bn_add.c:45:1: Parameter `*r->d`
    43.   
    44.   /* signed sub of b from a. */
    45. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    46.   {
    47.       int ret, r_neg, cmp_res;

crypto/bn/bn_add.c:65:13: Call
    63.           } else {
    64.               r_neg = 0;
    65.               BN_zero(r);
                      ^
    66.               ret = 1;
    67.           }

crypto/bn/bn_lib.c:358:1: <Length trace>
356.   }
357.   
358. > int BN_set_word(BIGNUM *a, BN_ULONG w)
359.   {
360.       bn_check_top(a);

crypto/bn/bn_lib.c:358:1: Parameter `*a->d`
      356.   }
      357.   
      358. > int BN_set_word(BIGNUM *a, BN_ULONG w)
      359.   {
      360.       bn_check_top(a);

crypto/bn/bn_lib.c:361:9: Call
      359.   {
      360.       bn_check_top(a);
      361.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                     ^
      362.           return 0;
      363.       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_lib.c:364:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_mod_sub_quick` 
      362.           return 0;
      363.       a->neg = 0;
      364.       a->d[0] = w;
                 ^
      365.       a->top = (w ? 1 : 0);
      366.       a->flags &= ~BN_FLG_FIXED_TOP;
