crypto/ec/ecp_nist.c:153: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_CTX_end`.
Showing all 9 steps of the trace


crypto/ec/ecp_nist.c:123:1: Parameter `ctx->stack.depth`
121.   	}
122.   
123. > int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,
124.   	const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
125.   	{

crypto/ec/ecp_nist.c:132:2: Call
130.   		if ((ctx = new_ctx = BN_CTX_new()) == NULL) return 0;
131.   
132.   	BN_CTX_start(ctx);
        ^
133.   
134.   	if (BN_ucmp(BN_get0_nist_prime_192(), p) == 0)

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

crypto/ec/ecp_nist.c:153:2: Call
151.   
152.    err:
153.   	BN_CTX_end(ctx);
        ^
154.   	if (new_ctx != NULL)
155.   		BN_CTX_free(new_ctx);

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

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

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

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

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

static unsigned int BN_STACK_pop(BN_STACK *st)
	{
	return st->indexes[--(st->depth)];
	}
['int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,\n\tconst BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)\n\t{\n\tint ret = 0;\n\tBN_CTX *new_ctx = NULL;\n\tif (ctx == NULL)\n\t\tif ((ctx = new_ctx = BN_CTX_new()) == NULL) return 0;\n\tBN_CTX_start(ctx);\n\tif (BN_ucmp(BN_get0_nist_prime_192(), p) == 0)\n\t\tgroup->field_mod_func = BN_nist_mod_192;\n\telse if (BN_ucmp(BN_get0_nist_prime_224(), p) == 0)\n\t\tgroup->field_mod_func = BN_nist_mod_224;\n\telse if (BN_ucmp(BN_get0_nist_prime_256(), p) == 0)\n\t\tgroup->field_mod_func = BN_nist_mod_256;\n\telse if (BN_ucmp(BN_get0_nist_prime_384(), p) == 0)\n\t\tgroup->field_mod_func = BN_nist_mod_384;\n\telse if (BN_ucmp(BN_get0_nist_prime_521(), p) == 0)\n\t\tgroup->field_mod_func = BN_nist_mod_521;\n\telse\n\t\t{\n\t\tECerr(EC_F_EC_GFP_NIST_GROUP_SET_CURVE, EC_R_NOT_A_NIST_PRIME);\n\t\tgoto err;\n\t\t}\n\tret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx);\n err:\n\tBN_CTX_end(ctx);\n\tif (new_ctx != NULL)\n\t\tBN_CTX_free(new_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}']