crypto/rsa/rsa_x931g.c:109: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_X931_derive_prime_ex`.
Showing all 35 steps of the trace


crypto/rsa/rsa_x931g.c:93:18: Call
91.           goto err;
92.       if (!rsa->e) {
93.           rsa->e = BN_dup(e);
                       ^
94.           if (!rsa->e)
95.               goto err;

crypto/bn/bn_lib.c:421:10: Call
  419.       if (t == NULL)
  420.           return NULL;
  421.       if (!BN_copy(t, a)) {
                  ^
  422.           BN_free(t);
  423.           return NULL;

crypto/bn/bn_lib.c:429:1: Parameter `*a->d`
    427.   }
    428.   
    429. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    430.   {
    431.       int i;

crypto/rsa/rsa_x931g.c:109:14: Call
107.               goto err;
108.   
109.           if (!BN_X931_derive_prime_ex(rsa->p, p1, p2,
                    ^
110.                                        Xp, Xp1, Xp2, e, ctx, cb))
111.               goto err;

crypto/bn/bn_x931p.c:98:1: Parameter `*p->d`
  96.    */
  97.   
  98. > int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
  99.                               const BIGNUM *Xp, const BIGNUM *Xp1,
  100.                               const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,

crypto/bn/bn_x931p.c:135:10: Call
  133.       /* First set p to value of Rp */
  134.   
  135.       if (!BN_mod_inverse(p, p2, p1, ctx))
                  ^
  136.           goto err;
  137.   

crypto/bn/bn_gcd.c:226:1: Parameter `*in->d`
    224.                                           BN_CTX *ctx);
    225.   
    226. > BIGNUM *BN_mod_inverse(BIGNUM *in,
    227.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
    228.   {

crypto/bn/bn_gcd.c:231:10: Call
    229.       BIGNUM *rv;
    230.       int noinv;
    231.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                    ^
    232.       if (noinv)
    233.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:237:1: Parameter `*in->d`
      235.   }
      236.   
      237. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
      238.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
      239.                              int *pnoinv)

crypto/bn/bn_x931p.c:138:10: Call
  136.           goto err;
  137.   
  138.       if (!BN_mul(p, p, p2, ctx))
                  ^
  139.           goto err;
  140.   

crypto/bn/bn_mul.c:883:1: Parameter `*r->d`
    881.   #endif                          /* BN_RECURSION */
    882.   
    883. > int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
    884.   {
    885.       int ret = 0;

crypto/bn/bn_x931p.c:147:10: Call
  145.           goto err;
  146.   
  147.       if (!BN_sub(p, p, t))
                  ^
  148.           goto err;
  149.   

crypto/bn/bn_add.c:234:1: Parameter `*r->d`
    232.   }
    233.   
    234. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    235.   {
    236.       int max;

crypto/bn/bn_add.c:275:9: Call
    273.   
    274.       max = (a->top > b->top) ? a->top : b->top;
    275.       if (bn_wexpand(r, max) == NULL)
                   ^
    276.           return (0);
    277.       if (BN_ucmp(a, b) < 0) {

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_x931p.c:155:10: Call
  153.       /* p now equals Rp */
  154.   
  155.       if (!BN_mod_sub(p, p, Xp, p1p2, ctx))
                  ^
  156.           goto err;
  157.   

crypto/bn/bn_mod.c:156:1: Parameter `*r->d`
    154.   }
    155.   
    156. > int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
    157.                  BN_CTX *ctx)
    158.   {

crypto/bn/bn_mod.c:159:10: Call
    157.                  BN_CTX *ctx)
    158.   {
    159.       if (!BN_sub(r, a, b))
                    ^
    160.           return 0;
    161.       return BN_nnmod(r, r, m, ctx);

crypto/bn/bn_add.c:234:1: Parameter `*r->d`
      232.   }
      233.   
      234. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
      235.   {
      236.       int max;

crypto/bn/bn_add.c:275:9: Call
      273.   
      274.       max = (a->top > b->top) ? a->top : b->top;
      275.       if (bn_wexpand(r, max) == NULL)
                     ^
      276.           return (0);
      277.       if (BN_ucmp(a, b) < 0) {

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_x931p.c:158:10: Call
  156.           goto err;
  157.   
  158.       if (!BN_add(p, p, Xp))
                  ^
  159.           goto err;
  160.   

crypto/bn/bn_add.c:63:1: Parameter `*r->d`
    61.   
    62.   /* r can == a or b */
    63. > int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    64.   {
    65.       const BIGNUM *tmp;

crypto/bn/bn_add.c:88:18: Call
    86.   
    87.           if (BN_ucmp(a, b) < 0) {
    88.               if (!BN_usub(r, b, a))
                           ^
    89.                   return (0);
    90.               r->neg = 1;

crypto/bn/bn_add.c:166:1: Parameter `*r->d`
      164.   
      165.   /* unsigned subtraction of b from a, a must be larger than b. */
      166. > int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
      167.   {
      168.       int max, min, dif;

crypto/bn/bn_x931p.c:178:16: Call
  176.                * better.
  177.                */
  178.               && BN_is_prime_fasttest_ex(p, 50, ctx, 1, cb))
                        ^
  179.               break;
  180.           if (!BN_add(p, p, p1p2))

crypto/bn/bn_prime.c:306:1: Parameter `*a->d`
    304.   }
    305.   
    306. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
    307.                               int do_trial_division, BN_GENCB *cb)
    308.   {

crypto/bn/bn_prime.c:387:13: Call
    385.           /* now 1 <= check < A */
    386.   
    387.           j = witness(check, A, A1, A1_odd, k, ctx, mont);
                       ^
    388.           if (j == -1)
    389.               goto err;

crypto/bn/bn_prime.c:478:1: Parameter `*a->d`
      476.   }
      477.   
      478. > static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
      479.                      const BIGNUM *a1_odd, int k, BN_CTX *ctx,
      480.                      BN_MONT_CTX *mont)

crypto/bn/bn_prime.c:482:10: Call
      480.                      BN_MONT_CTX *mont)
      481.   {
      482.       if (!BN_mod_exp_mont(w, w, a1_odd, a, ctx, mont)) /* w := w^a1_odd mod a */
                      ^
      483.           return -1;
      484.       if (BN_is_one(w))

crypto/bn/bn_exp.c:496:14: <Offset trace>
494.           /* 2^(top*BN_BITS2) - m */
495.           r->d[0] = (0 - m->d[0]) & BN_MASK2;
496.           for (i = 1; i < j; i++)
                    ^
497.               r->d[i] = (~m->d[i]) & BN_MASK2;
498.           r->top = j;

crypto/bn/bn_exp.c:496:14: Assignment
        494.           /* 2^(top*BN_BITS2) - m */
        495.           r->d[0] = (0 - m->d[0]) & BN_MASK2;
        496.           for (i = 1; i < j; i++)
                            ^
        497.               r->d[i] = (~m->d[i]) & BN_MASK2;
        498.           r->top = j;

crypto/bn/bn_exp.c:401:1: <Length trace>
399.   }
400.   
401. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
402.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
403.   {

crypto/bn/bn_exp.c:401:1: Parameter `*m->d`
        399.   }
        400.   
        401. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
        402.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
        403.   {

crypto/bn/bn_exp.c:497:25: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_X931_derive_prime_ex` 
        495.           r->d[0] = (0 - m->d[0]) & BN_MASK2;
        496.           for (i = 1; i < j; i++)
        497.               r->d[i] = (~m->d[i]) & BN_MASK2;
                                       ^
        498.           r->top = j;
        499.           /*
