test/bntest.c:1783: 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:1779:10: Call
1777.   
1778.       /* Test that BN_mul never gives negative zero. */
1779.       if (!TEST_true(BN_set_word(a, 1)))
                 ^
1780.           goto err;
1781.       BN_set_negative(a, 1);

crypto/bn/bn_lib.c:387:1: Parameter `*a->d`
  385.   }
  386.   
  387. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  388.   {
  389.       bn_check_top(a);

crypto/bn/bn_lib.c:390:9: Call
  388.   {
  389.       bn_check_top(a);
  390.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  391.           return 0;
  392.       a->neg = 0;

crypto/bn/bn_lcl.h:651:1: Parameter `*a->d`
    649.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
    650.   
    651. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
    652.   {
    653.       if (bits > (INT_MAX - BN_BITS2 + 1))

test/bntest.c:1783:10: Call
1781.       BN_set_negative(a, 1);
1782.       BN_zero(b);
1783.       if (!TEST_true(BN_mul(c, a, b, ctx)))
                 ^
1784.           goto err;
1785.       if (!TEST_BN_eq_zero(c)

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

crypto/bn/bn_mul.c:601:5: Call
  599.   #endif
  600.       rr->neg = a->neg ^ b->neg;
  601.       bn_correct_top(rr);
             ^
  602.       if (r != rr && BN_copy(r, rr) == NULL)
  603.           goto err;

crypto/bn/bn_lib.c:945:1: <Offset trace>
943.   }
944.   
945. > void bn_correct_top(BIGNUM *a)
946.   {
947.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:945:1: Parameter `a->top`
    943.   }
    944.   
    945. > void bn_correct_top(BIGNUM *a)
    946.   {
    947.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:948:5: Assignment
    946.   {
    947.       BN_ULONG *ftl;
    948.       int tmp_top = a->top;
               ^
    949.   
    950.       if (tmp_top > 0) {

crypto/bn/bn_lib.c:945:1: <Length trace>
943.   }
944.   
945. > void bn_correct_top(BIGNUM *a)
946.   {
947.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:945:1: Parameter `*a->d`
    943.   }
    944.   
    945. > void bn_correct_top(BIGNUM *a)
    946.   {
    947.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:951:14: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mul` 
    949.   
    950.       if (tmp_top > 0) {
    951.           for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
                        ^
    952.               ftl--;
    953.               if (*ftl != 0)
