apps/dhparam.c:361: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `DH_check`.
Showing all 16 steps of the trace


apps/dhparam.c:298:32: Call
296.                          num, g);
297.               BIO_printf(bio_err, "This is going to take a long time\n");
298.               if (dh == NULL || !DH_generate_parameters_ex(dh, num, g, cb)) {
                                      ^
299.                   BN_GENCB_free(cb);
300.                   ERR_print_errors(bio_err);

crypto/dh/dh_gen.c:72:1: Parameter `ret->p->top`
  70.                                   BN_GENCB *cb);
  71.   
  72. > int DH_generate_parameters_ex(DH *ret, int prime_len, int generator,
  73.                                 BN_GENCB *cb)
  74.   {

apps/dhparam.c:361:14: Call
359.   
360.       if (check) {
361.           if (!DH_check(dh, &i)) {
                    ^
362.               ERR_print_errors(bio_err);
363.               goto end;

crypto/dh/dh_check.c:74:1: Parameter `dh->p->top`
  72.    */
  73.   
  74. > int DH_check(const DH *dh, int *ret)
  75.   {
  76.       int ok = 0;

crypto/dh/dh_check.c:108:14: Call
  106.               *ret |= DH_CHECK_Q_NOT_PRIME;
  107.           /* Check p == 1 mod q  i.e. q divides p - 1 */
  108.           if (!BN_div(t1, t2, dh->p, dh->q, ctx))
                      ^
  109.               goto err;
  110.           if (!BN_is_one(t2))

crypto/bn/bn_div.c:189:1: Parameter `num->top`
    187.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    188.    */
    189. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    190.              BN_CTX *ctx)
    191.   {

crypto/bn/bn_div.c:259:11: Call
    257.       sdiv->neg = 0;
    258.       norm_shift += BN_BITS2;
    259.       if (!(BN_lshift(snum, num, norm_shift)))
                     ^
    260.           goto err;
    261.       snum->neg = 0;

crypto/bn/bn_shift.c:130:1: <Offset trace>
128.   }
129.   
130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
131.   {
132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:130:1: Parameter `n`
      128.   }
      129.   
      130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      131.   {
      132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:145:5: Assignment
      143.   
      144.       r->neg = a->neg;
      145.       nw = n / BN_BITS2;
                 ^
      146.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
      147.           return (0);

crypto/bn/bn_shift.c:130:1: <Length trace>
128.   }
129.   
130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
131.   {
132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:130:1: Parameter `*r->d`
      128.   }
      129.   
      130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      131.   {
      132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:146:9: Call
      144.       r->neg = a->neg;
      145.       nw = n / BN_BITS2;
      146.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                     ^
      147.           return (0);
      148.       lb = n % BN_BITS2;

crypto/bn/bn_lib.c:995:1: Parameter `*a->d`
        993.   }
        994.   
        995. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        996.   {
        997.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:151:5: Assignment
      149.       rb = BN_BITS2 - lb;
      150.       f = a->d;
      151.       t = r->d;
                 ^
      152.       t[a->top + nw] = 0;
      153.       if (lb == 0)

crypto/bn/bn_shift.c:159:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `DH_check` 
      157.           for (i = a->top - 1; i >= 0; i--) {
      158.               l = f[i];
      159.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                         ^
      160.               t[nw + i] = (l << lb) & BN_MASK2;
      161.           }
