test/testutil/tests.c:413: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_set_word`.
Showing all 15 steps of the trace


test/testutil/tests.c:411:10: Call
409.           return 1;
410.       bw = BN_new();
411.       aa = BN_dup(a);
                ^
412.       BN_set_negative(aa, 0);
413.       BN_set_word(bw, w);

crypto/bn/bn_lib.c:272:10: Call
  270.       if (t == NULL)
  271.           return NULL;
  272.       if (!BN_copy(t, a)) {
                  ^
  273.           BN_free(t);
  274.           return NULL;

crypto/bn/bn_lib.c:280:1: Parameter `*a->d`
    278.   }
    279.   
    280. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    281.   {
    282.       bn_check_top(b);

test/testutil/tests.c:413:5: Call
411.       aa = BN_dup(a);
412.       BN_set_negative(aa, 0);
413.       BN_set_word(bw, w);
           ^
414.       test_fail_bignum_message(NULL, file, line, "BIGNUM", bns, ws, "abs==",
415.                                aa, bw);

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_lcl.h:668:12: Call
    666.           return a;
    667.   
    668.       return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
                      ^
    669.   }
    670.   

crypto/bn/bn_lib.c:244:1: Parameter `*b->d`
      242.    */
      243.   
      244. > BIGNUM *bn_expand2(BIGNUM *b, int words)
      245.   {
      246.       if (words > b->dmax) {

crypto/bn/bn_lib.c:247:23: Call
      245.   {
      246.       if (words > b->dmax) {
      247.           BN_ULONG *a = bn_expand_internal(b, words);
                                   ^
      248.           if (!a)
      249.               return NULL;

crypto/bn/bn_lib.c:208:1: <Offset trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `b->top`
        206.   /* This is used by bn_expand2() */
        207.   /* The caller MUST check that words > b->dmax before calling this */
        208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        209.   {
        210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: <Length trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `*b->d`
        206.   /* This is used by bn_expand2() */
        207.   /* The caller MUST check that words > b->dmax before calling this */
        208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        209.   {
        210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:231:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_set_word` 
        229.       assert(b->top <= words);
        230.       if (b->top > 0)
        231.           memcpy(a, b->d, sizeof(*a) * b->top);
                       ^
        232.   
        233.       return a;
