crypto/bn/bn_prime.c:559: error: BUFFER_OVERRUN_L3
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_rand`.
Showing all 20 steps of the trace


crypto/bn/bn_prime.c:550:10: Call
548.       bits--;
549.       BN_CTX_start(ctx);
550.       t1 = BN_CTX_get(ctx);
                ^
551.       q = BN_CTX_get(ctx);
552.       qadd = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       ctx->used++;
  231.       CTXDBG_RET(ctx, ret);

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_prime.c:559:10: Call
557.           goto err;
558.   
559.       if (!BN_rand(q, bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ODD))
                ^
560.           goto err;
561.   

crypto/bn/bn_rand.c:93:1: Parameter `*rnd->d`
  91.   }
  92.   
  93. > int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
  94.   {
  95.       return bnrand(0, rnd, bits, top, bottom);

crypto/bn/bn_rand.c:95:12: Call
  93.   int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
  94.   {
  95.       return bnrand(0, rnd, bits, top, bottom);
                   ^
  96.   }
  97.   

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:84:10: Call
    82.       if (bottom)                 /* set bottom bit if requested */
    83.           buf[bytes - 1] |= 1;
    84.       if (!BN_bin2bn(buf, bytes, rnd))
                   ^
    85.           goto err;
    86.       ret = 1;

crypto/bn/bn_lib.c:475:1: Parameter `*ret->d`
      473.   }
      474.   
      475. > BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
      476.   {
      477.       unsigned int i, m;

crypto/bn/bn_lib.c:497:9: Call
      495.       i = ((n - 1) / BN_BYTES) + 1;
      496.       m = ((n - 1) % (BN_BYTES));
      497.       if (bn_wexpand(ret, (int)i) == NULL) {
                     ^
      498.           BN_free(bn);
      499.           return NULL;

crypto/bn/bn_lib.c:1016:1: Parameter `*a->d`
        1014.   }
        1015.   
        1016. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        1017.   {
        1018.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:1018:37: Call
        1016.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
        1017.   {
        1018.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                    ^
        1019.   }
        1020.   

crypto/bn/bn_lib.c:323:1: Parameter `*b->d`
          321.    */
          322.   
          323. > BIGNUM *bn_expand2(BIGNUM *b, int words)
          324.   {
          325.       bn_check_top(b);

crypto/bn/bn_lib.c:328:23: Call
          326.   
          327.       if (words > b->dmax) {
          328.           BN_ULONG *a = bn_expand_internal(b, words);
                                       ^
          329.           if (!a)
          330.               return NULL;

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

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

crypto/bn/bn_lib.c:272:5: Assignment
            270.   
            271.   #if 1
            272.       B = b->d;
                       ^
            273.       /* Check if the previous number needs to be copied */
            274.       if (B != NULL) {

crypto/bn/bn_lib.c:289:18: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_rand` 
            287.               a1 = B[1];
            288.               a2 = B[2];
            289.               a3 = B[3];
                                    ^
            290.               A[0] = a0;
            291.               A[1] = a1;
