crypto/bn/bn_rsa_fips186_4.c:217: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `bn_rsa_fips186_4_derive_prime`.
Showing all 21 steps of the trace


crypto/bn/bn_rsa_fips186_4.c:167:1: Parameter `ctx->stack.depth`
165.    * Returns: 1 on success otherwise it returns 0.
166.    */
167. > int bn_rsa_fips186_4_gen_prob_primes(BIGNUM *p, BIGNUM *Xpout,
168.                                        BIGNUM *p1, BIGNUM *p2,
169.                                        const BIGNUM *Xp, const BIGNUM *Xp1,

crypto/bn/bn_rsa_fips186_4.c:180:5: Call
178.           return 0;
179.   
180.       BN_CTX_start(ctx);
           ^
181.   
182.       p1i = (p1 != NULL) ? p1 : BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:194:1: Parameter `ctx->stack.depth`
  192.   }
  193.   
  194. > void BN_CTX_start(BN_CTX *ctx)
  195.   {
  196.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/bn/bn_rsa_fips186_4.c:209:10: Call
207.   
208.       /* (Steps 4.2/5.2) - find first auxiliary probable primes */
209.       if (!bn_rsa_fips186_4_find_aux_prob_prime(Xp1i, p1i, ctx, cb)
                ^
210.               || !bn_rsa_fips186_4_find_aux_prob_prime(Xp2i, p2i, ctx, cb))
211.           goto err;

crypto/bn/bn_rsa_fips186_4.c:120:1: Parameter `ctx->stack.depth`
  118.    * Returns: 1 on success otherwise it returns 0.
  119.    */
  120. > static int bn_rsa_fips186_4_find_aux_prob_prime(const BIGNUM *Xp1,
  121.                                                   BIGNUM *p1, BN_CTX *ctx,
  122.                                                   BN_GENCB *cb)

crypto/bn/bn_rsa_fips186_4.c:210:17: Call
208.       /* (Steps 4.2/5.2) - find first auxiliary probable primes */
209.       if (!bn_rsa_fips186_4_find_aux_prob_prime(Xp1i, p1i, ctx, cb)
210.               || !bn_rsa_fips186_4_find_aux_prob_prime(Xp2i, p2i, ctx, cb))
                       ^
211.           goto err;
212.       /* (Table B.1) auxiliary prime Max length check */

crypto/bn/bn_rsa_fips186_4.c:120:1: Parameter `ctx->stack.depth`
  118.    * Returns: 1 on success otherwise it returns 0.
  119.    */
  120. > static int bn_rsa_fips186_4_find_aux_prob_prime(const BIGNUM *Xp1,
  121.                                                   BIGNUM *p1, BN_CTX *ctx,
  122.                                                   BN_GENCB *cb)

crypto/bn/bn_rsa_fips186_4.c:217:10: Call
215.           goto err;
216.       /* (Steps 4.3/5.3) - generate prime */
217.       if (!bn_rsa_fips186_4_derive_prime(p, Xpout, Xp, p1i, p2i, nlen, e, ctx, cb))
                ^
218.           goto err;
219.       ret = 1;

crypto/bn/bn_rsa_fips186_4.c:255:1: Parameter `ctx->stack.depth`
  253.    *     Y, X, r1, r2, e are not NULL.
  254.    */
  255. > int bn_rsa_fips186_4_derive_prime(BIGNUM *Y, BIGNUM *X, const BIGNUM *Xin,
  256.                                     const BIGNUM *r1, const BIGNUM *r2, int nlen,
  257.                                     const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb)

crypto/bn/bn_rsa_fips186_4.c:267:5: Call
  265.       if (checks == 0)
  266.           return 0;
  267.       BN_CTX_start(ctx);
             ^
  268.   
  269.       R = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:194:1: Parameter `ctx->stack.depth`
    192.   }
    193.   
    194. > void BN_CTX_start(BN_CTX *ctx)
    195.   {
    196.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/bn/bn_rsa_fips186_4.c:282:16: Call
  280.       if (!(BN_lshift1(r1x2, r1)
  281.               /* (Step 1) GCD(2r1, r2) = 1 */
  282.               && BN_gcd(tmp, r1x2, r2, ctx)
                        ^
  283.               && BN_is_one(tmp)
  284.               /* (Step 2) R = ((r2^-1 mod 2r1) * r2) - ((2r1^-1 mod r2)*2r1) */

crypto/bn/bn_gcd.c:15:1: Parameter `ctx->stack.depth`
    13.   static BIGNUM *euclid(BIGNUM *a, BIGNUM *b);
    14.   
    15. > int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx)
    16.   {
    17.       BIGNUM *a, *b, *t;

crypto/bn/bn_gcd.c:23:5: Call
    21.       bn_check_top(in_b);
    22.   
    23.       BN_CTX_start(ctx);
              ^
    24.       a = BN_CTX_get(ctx);
    25.       b = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:194:1: Parameter `ctx->stack.depth`
      192.   }
      193.   
      194. > void BN_CTX_start(BN_CTX *ctx)
      195.   {
      196.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/bn/bn_gcd.c:49:5: Call
    47.       ret = 1;
    48.    err:
    49.       BN_CTX_end(ctx);
              ^
    50.       bn_check_top(r);
    51.       return ret;

crypto/bn/bn_ctx.c:208:1: Parameter `ctx->stack.depth`
      206.   }
      207.   
      208. > void BN_CTX_end(BN_CTX *ctx)
      209.   {
      210.       if (ctx == NULL)

crypto/bn/bn_ctx.c:216:27: Call
      214.           ctx->err_stack--;
      215.       else {
      216.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                       ^
      217.           /* Does this stack frame have anything to release? */
      218.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:298:1: <LHS trace>
296.   }
297.   
298. > static unsigned int BN_STACK_pop(BN_STACK *st)
299.   {
300.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:298:1: Parameter `st->depth`
        296.   }
        297.   
        298. > static unsigned int BN_STACK_pop(BN_STACK *st)
        299.   {
        300.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:300:12: Binary operation: ([0, +oo] - 1):unsigned32 by call to `bn_rsa_fips186_4_derive_prime` 
        298.   static unsigned int BN_STACK_pop(BN_STACK *st)
        299.   {
        300.       return st->indexes[--(st->depth)];
                          ^
        301.   }
        302.   
