engines/ccgost/gost_sign.c:85: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_mod_mul`.
Showing all 24 steps of the trace


engines/ccgost/gost_sign.c:58:2: Call
56.   	/* check if H(M) mod q is zero */
57.   	BN_CTX *ctx=BN_CTX_new();
58.   	BN_CTX_start(ctx);
       ^
59.   	if (!newsig)
60.   		{

crypto/bn/bn_ctx.c:255:1: Parameter `ctx->stack.depth`
  253.   	}
  254.   
  255. > void BN_CTX_start(BN_CTX *ctx)
  256.   	{
  257.   	CTXDBG_ENTRY("BN_CTX_start", ctx);

engines/ccgost/gost_sign.c:67:2: Call
65.   	k = BN_CTX_get(ctx);
66.   	tmp2 = BN_CTX_get(ctx);
67.   	BN_mod(tmp,md,dsa->q,ctx);
       ^
68.   	if (BN_is_zero(tmp))
69.   		{

crypto/bn/bn_div.c:179:1: Parameter `ctx->stack.depth`
  177.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
  178.    */
  179. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  180.   	   BN_CTX *ctx)
  181.   	{

engines/ccgost/gost_sign.c:79:4: Call
77.   			BN_rand_range(k,dsa->q);
78.   			/* generate r = (a^x mod p) mod q */
79.   			BN_mod_exp(tmp,dsa->g, k, dsa->p,ctx);
         ^
80.   			if (!(newsig->r)) newsig->r=BN_new();
81.   			BN_mod(newsig->r,tmp,dsa->q,ctx);

crypto/bn/bn_exp.c:163:1: Parameter `ctx->stack.depth`
  161.   
  162.   
  163. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  164.   	       BN_CTX *ctx)
  165.   	{

crypto/bn/bn_exp.c:219:8: Call
  217.   			{
  218.   			BN_ULONG A = a->d[0];
  219.   			ret=BN_mod_exp_mont_word(r,A,p,m,ctx,NULL);
                ^
  220.   			}
  221.   		else

crypto/bn/bn_exp.c:724:1: Parameter `ctx->stack.depth`
    722.   	}
    723.   
    724. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    725.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    726.   	{

engines/ccgost/gost_sign.c:81:4: Call
79.   			BN_mod_exp(tmp,dsa->g, k, dsa->p,ctx);
80.   			if (!(newsig->r)) newsig->r=BN_new();
81.   			BN_mod(newsig->r,tmp,dsa->q,ctx);
         ^
82.   			}
83.   		while (BN_is_zero(newsig->r));

crypto/bn/bn_div.c:179:1: Parameter `ctx->stack.depth`
  177.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
  178.    */
  179. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  180.   	   BN_CTX *ctx)
  181.   	{

engines/ccgost/gost_sign.c:85:3: Call
83.   		while (BN_is_zero(newsig->r));
84.   		/* generate s = (xr + k(Hm)) mod q */
85.   		BN_mod_mul(tmp,dsa->priv_key,newsig->r,dsa->q,ctx);
        ^
86.   		BN_mod_mul(tmp2,k,md,dsa->q,ctx);
87.   		if (!newsig->s) newsig->s=BN_new();

crypto/bn/bn_mod.c:178:1: Parameter `ctx->stack.depth`
  176.   
  177.   /* slow but works */
  178. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  179.   	BN_CTX *ctx)
  180.   	{

crypto/bn/bn_mod.c:188:2: Call
  186.   	bn_check_top(m);
  187.   
  188.   	BN_CTX_start(ctx);
          ^
  189.   	if ((t = BN_CTX_get(ctx)) == NULL) goto err;
  190.   	if (a == b)

crypto/bn/bn_ctx.c:255:1: Parameter `ctx->stack.depth`
    253.   	}
    254.   
    255. > void BN_CTX_start(BN_CTX *ctx)
    256.   	{
    257.   	CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_mod.c:191:10: Call
  189.   	if ((t = BN_CTX_get(ctx)) == NULL) goto err;
  190.   	if (a == b)
  191.   		{ if (!BN_sqr(t,a,ctx)) goto err; }
                  ^
  192.   	else
  193.   		{ if (!BN_mul(t,a,b,ctx)) goto err; }

crypto/bn/bn_sqr.c:65:1: Parameter `ctx->stack.depth`
    63.   /* r must not be a */
    64.   /* I've just gone over this and it is now %20 faster on x86 - eay - 27 Jun 96 */
    65. > int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
    66.   	{
    67.   	int max,al;

crypto/bn/bn_sqr.c:83:2: Call
    81.   		}
    82.   
    83.   	BN_CTX_start(ctx);
           ^
    84.   	rr=(a != r) ? r : BN_CTX_get(ctx);
    85.   	tmp=BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:255:1: Parameter `ctx->stack.depth`
      253.   	}
      254.   
      255. > void BN_CTX_start(BN_CTX *ctx)
      256.   	{
      257.   	CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_sqr.c:153:2: Call
    151.   	bn_check_top(rr);
    152.   	bn_check_top(tmp);
    153.   	BN_CTX_end(ctx);
            ^
    154.   	return(ret);
    155.   	}

crypto/bn/bn_ctx.c:270:1: Parameter `ctx->stack.depth`
      268.   	}
      269.   
      270. > void BN_CTX_end(BN_CTX *ctx)
      271.   	{
      272.   	CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:277:21: Call
      275.   	else
      276.   		{
      277.   		unsigned int fp = BN_STACK_pop(&ctx->stack);
                                 ^
      278.   		/* Does this stack frame have anything to release? */
      279.   		if(fp < ctx->used)

crypto/bn/bn_ctx.c:351:1: <LHS trace>
349.   	}
350.   
351. > static unsigned int BN_STACK_pop(BN_STACK *st)
352.   	{
353.   	return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:351:1: Parameter `st->depth`
        349.   	}
        350.   
        351. > static unsigned int BN_STACK_pop(BN_STACK *st)
        352.   	{
        353.   	return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:353:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `BN_mod_mul` 
        351.   static unsigned int BN_STACK_pop(BN_STACK *st)
        352.   	{
        353.   	return st->indexes[--(st->depth)];
                       ^
        354.   	}
        355.   
