test/bntest.c:1795: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mul`.
Showing all 13 steps of the trace


test/bntest.c:1791:10: Call
1789.   
1790.       /* Test that BN_mul never gives negative zero. */
1791.       if (!TEST_true(BN_set_word(a, 1)))
                 ^
1792.           goto err;
1793.       BN_set_negative(a, 1);

crypto/bn/bn_lib.c:395:1: Parameter `*a->d`
  393.   }
  394.   
  395. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  396.   {
  397.       bn_check_top(a);

crypto/bn/bn_lib.c:398:9: Call
  396.   {
  397.       bn_check_top(a);
  398.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  399.           return (0);
  400.       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))

test/bntest.c:1795:10: Call
1793.       BN_set_negative(a, 1);
1794.       BN_zero(b);
1795.       if (!TEST_true(BN_mul(c, a, b, ctx)))
                 ^
1796.           goto err;
1797.       if (!TEST_BN_eq_zero(c)

crypto/bn/bn_mul.c:545:13: Assignment
  543.               if (bn_wexpand(rr, 16) == NULL)
  544.                   goto err;
  545.               rr->top = 16;
                     ^
  546.               bn_mul_comba8(rr->d, a->d, b->d);
  547.               goto end;

crypto/bn/bn_mul.c:639:5: Call
  637.   #endif
  638.       rr->neg = a->neg ^ b->neg;
  639.       bn_correct_top(rr);
             ^
  640.       if (r != rr && BN_copy(r, rr) == NULL)
  641.           goto err;

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_mul` 
    957.   
    958.       if (tmp_top > 0) {
    959.           for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
                        ^
    960.               ftl--;
    961.               if (*ftl != 0)
