test/dhtest.c:60: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_set_word`.
Showing all 10 steps of the trace


test/dhtest.c:59:10: Call
57.   
58.       /* using a small predefined Sophie Germain DH group with generator 3 */
59.       if (!TEST_true(BN_set_word(p, 4079L))
               ^
60.           || !TEST_true(BN_set_word(q, 2039L))
61.           || !TEST_true(BN_set_word(g, 3L))

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))

test/dhtest.c:60:13: Call
58.       /* using a small predefined Sophie Germain DH group with generator 3 */
59.       if (!TEST_true(BN_set_word(p, 4079L))
60.           || !TEST_true(BN_set_word(q, 2039L))
                  ^
61.           || !TEST_true(BN_set_word(g, 3L))
62.           || !TEST_true(DH_set0_pqg(dh, p, q, g)))

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

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_lib.c:365:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_set_word` 
  363.           return 0;
  364.       a->neg = 0;
  365.       a->d[0] = w;
             ^
  366.       a->top = (w ? 1 : 0);
  367.       a->flags &= ~BN_FLG_FIXED_TOP;
