crypto/rsa/rsa_gen.c:152: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_generate_prime_ex`.
Showing all 13 steps of the trace


crypto/rsa/rsa_gen.c:88:1: Parameter `rsa->q->d`
86.   }
87.   
88. > static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
89.                                 BN_GENCB *cb)
90.   {

crypto/rsa/rsa_gen.c:152:18: Call
150.           unsigned int degenerate = 0;
151.           do {
152.               if (!BN_generate_prime_ex(rsa->q, bitsq, 0, NULL, NULL, cb))
                        ^
153.                   goto err;
154.           } while ((BN_cmp(rsa->p, rsa->q) == 0) && (++degenerate < 3));

crypto/bn/bn_prime.c:208:1: Parameter `*ret->d`
  206.   }
  207.   
  208. > int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
  209.                            const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb)
  210.   {

crypto/bn/bn_prime.c:241:14: Call
  239.       /* make a random number and set the top and bottom bits */
  240.       if (add == NULL) {
  241.           if (!probable_prime(ret, bits, mods))
                      ^
  242.               goto err;
  243.       } else {

crypto/bn/bn_prime.c:505:1: Parameter `*rnd->d`
    503.   }
    504.   
    505. > static int probable_prime(BIGNUM *rnd, int bits, prime_t *mods)
    506.   {
    507.       int i;

crypto/bn/bn_prime.c:513:10: Call
    511.   
    512.    again:
    513.       if (!BN_rand(rnd, bits, 1, 1))
                    ^
    514.           return (0);
    515.       /* we now have a random number 'rnd' to test. */

crypto/bn/bn_rand.c:200:1: Parameter `*rnd->d`
      198.   }
      199.   
      200. > int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
      201.   {
      202.       return bnrand(0, rnd, bits, top, bottom);

crypto/bn/bn_rand.c:202:12: Call
      200.   int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
      201.   {
      202.       return bnrand(0, rnd, bits, top, bottom);
                        ^
      203.   }
      204.   

crypto/bn/bn_rand.c:119:1: Parameter `*rnd->d`
        117.   #include <openssl/sha.h>
        118.   
        119. > static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
        120.   {
        121.       unsigned char *buf = NULL;

crypto/bn/bn_rand.c:131:9: Call
        129.   
        130.       if (bits == 0) {
        131.           BN_zero(rnd);
                       ^
        132.           return 1;
        133.       }

crypto/bn/bn_lib.c:530:1: <Length trace>
528.   }
529.   
530. > int BN_set_word(BIGNUM *a, BN_ULONG w)
531.   {
532.       bn_check_top(a);

crypto/bn/bn_lib.c:530:1: Parameter `*a->d`
          528.   }
          529.   
          530. > int BN_set_word(BIGNUM *a, BN_ULONG w)
          531.   {
          532.       bn_check_top(a);

crypto/bn/bn_lib.c:536:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_generate_prime_ex` 
          534.           return (0);
          535.       a->neg = 0;
          536.       a->d[0] = w;
                     ^
          537.       a->top = (w ? 1 : 0);
          538.       bn_check_top(a);
