crypto/bn/bn_gf2m.c:721: error: INTEGER_OVERFLOW_L2
  ([0, 4+max(0, `ctx->stack.depth`)] - 1):unsigned32 by call to `BN_CTX_end`.
Showing all 9 steps of the trace


crypto/bn/bn_gf2m.c:705:1: Parameter `ctx->stack.depth`
703.    * BN_GF2m_mod_div function.
704.    */
705. > int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *yy, const BIGNUM *xx, const int p[], BN_CTX *ctx)
706.   	{
707.   	BIGNUM *field;

crypto/bn/bn_gf2m.c:713:2: Call
711.   	bn_check_top(xx);
712.   
713.   	BN_CTX_start(ctx);
        ^
714.   	if ((field = BN_CTX_get(ctx)) == NULL) goto err;
715.   	if (!BN_GF2m_arr2poly(p, field)) goto err;

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_gf2m.c:721:2: Call
719.   
720.   err:
721.   	BN_CTX_end(ctx);
        ^
722.   	return ret;
723.   	}

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, 4+max(0, ctx->stack.depth)] - 1):unsigned32 by call to `BN_CTX_end` 
    351.   static unsigned int BN_STACK_pop(BN_STACK *st)
    352.   	{
    353.   	return st->indexes[--(st->depth)];
                   ^
    354.   	}
    355.   

static unsigned int BN_STACK_pop(BN_STACK *st)
	{
	return st->indexes[--(st->depth)];
	}
['int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *yy, const BIGNUM *xx, const int p[], BN_CTX *ctx)\n\t{\n\tBIGNUM *field;\n\tint ret = 0;\n\tbn_check_top(yy);\n\tbn_check_top(xx);\n\tBN_CTX_start(ctx);\n\tif ((field = BN_CTX_get(ctx)) == NULL) goto err;\n\tif (!BN_GF2m_arr2poly(p, field)) goto err;\n\tret = BN_GF2m_mod_div(r, yy, xx, field, ctx);\n\tbn_check_top(r);\nerr:\n\tBN_CTX_end(ctx);\n\treturn ret;\n\t}', 'void BN_CTX_start(BN_CTX *ctx)\n\t{\n\tCTXDBG_ENTRY("BN_CTX_start", ctx);\n\tif(ctx->err_stack || ctx->too_many)\n\t\tctx->err_stack++;\n\telse if(!BN_STACK_push(&ctx->stack, ctx->used))\n\t\t{\n\t\tBNerr(BN_F_BN_CTX_START,BN_R_TOO_MANY_TEMPORARY_VARIABLES);\n\t\tctx->err_stack++;\n\t\t}\n\tCTXDBG_EXIT(ctx);\n\t}', 'void BN_CTX_end(BN_CTX *ctx)\n\t{\n\tCTXDBG_ENTRY("BN_CTX_end", ctx);\n\tif(ctx->err_stack)\n\t\tctx->err_stack--;\n\telse\n\t\t{\n\t\tunsigned int fp = BN_STACK_pop(&ctx->stack);\n\t\tif(fp < ctx->used)\n\t\t\tBN_POOL_release(&ctx->pool, ctx->used - fp);\n\t\tctx->used = fp;\n\t\tctx->too_many = 0;\n\t\t}\n\tCTXDBG_EXIT(ctx);\n\t}', 'static unsigned int BN_STACK_pop(BN_STACK *st)\n\t{\n\treturn st->indexes[--(st->depth)];\n\t}']