test/bntest.c:1934: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_bntest_rand`.
Showing all 14 steps of the trace


test/bntest.c:1928:5: Call
1926.       c = BN_new();
1927.       d = BN_new();
1928.       BN_one(c);
            ^
1929.   
1930.       if (a_)

crypto/bn/bn_lib.c:463:1: Parameter `*a->d`
  461.   }
  462.   
  463. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  464.   {
  465.       bn_check_top(a);

crypto/bn/bn_lib.c:466:9: Call
  464.   {
  465.       bn_check_top(a);
  466.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  467.           return (0);
  468.       a->neg = 0;

crypto/bn/bn_lcl.h:676:1: Parameter `*a->d`
    674.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
    675.   
    676. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
    677.   {
    678.       if (bits > (INT_MAX - BN_BITS2 + 1))

test/bntest.c:1934:9: Call
1932.       else {
1933.           a = BN_new();
1934.           BN_bntest_rand(a, 200, 0, 0);
                ^
1935.           a->neg = rand_neg();
1936.       }

crypto/bn/bn_rand.c:106:1: Parameter `*rnd->d`
  104.   }
  105.   
  106. > int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
  107.   {
  108.       return bnrand(2, rnd, bits, top, bottom);

crypto/bn/bn_rand.c:108:12: Call
  106.   int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
  107.   {
  108.       return bnrand(2, rnd, bits, top, bottom);
                    ^
  109.   }
  110.   

crypto/bn/bn_rand.c:17:1: Parameter `*rnd->d`
    15.   #include <openssl/sha.h>
    16.   
    17. > static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
    18.   {
    19.       unsigned char *buf = NULL;

crypto/bn/bn_rand.c:26:9: Call
    24.           if (top != BN_RAND_TOP_ANY || bottom != BN_RAND_BOTTOM_ANY)
    25.               goto toosmall;
    26.           BN_zero(rnd);
                  ^
    27.           return 1;
    28.       }

crypto/bn/bn_lib.c:463:1: <Length trace>
461.   }
462.   
463. > int BN_set_word(BIGNUM *a, BN_ULONG w)
464.   {
465.       bn_check_top(a);

crypto/bn/bn_lib.c:463:1: Parameter `*a->d`
      461.   }
      462.   
      463. > int BN_set_word(BIGNUM *a, BN_ULONG w)
      464.   {
      465.       bn_check_top(a);

crypto/bn/bn_lib.c:466:9: Call
      464.   {
      465.       bn_check_top(a);
      466.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                     ^
      467.           return (0);
      468.       a->neg = 0;

crypto/bn/bn_lcl.h:676:1: Parameter `*a->d`
        674.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
        675.   
        676. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
        677.   {
        678.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lib.c:469:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_bntest_rand` 
      467.           return (0);
      468.       a->neg = 0;
      469.       a->d[0] = w;
                 ^
      470.       a->top = (w ? 1 : 0);
      471.       bn_check_top(a);
