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


crypto/ec/ec2_smpl.c:772:1: Parameter `ctx->stack.depth`
770.    * Appendix Alg Mxy.
771.    */
772. > static
773.   int ec_GF2m_simple_ladder_post(const EC_GROUP *group,
774.                                  EC_POINT *r, EC_POINT *s,

crypto/ec/ec2_smpl.c:792:5: Call
790.       }
791.   
792.       BN_CTX_start(ctx);
           ^
793.       t0 = BN_CTX_get(ctx);
794.       t1 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:181:1: Parameter `ctx->stack.depth`
  179.   }
  180.   
  181. > void BN_CTX_start(BN_CTX *ctx)
  182.   {
  183.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/ec/ec2_smpl.c:831:5: Call
829.   
830.    err:
831.       BN_CTX_end(ctx);
           ^
832.       return ret;
833.   }

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

crypto/bn/bn_ctx.c:201:27: Call
  199.           ctx->err_stack--;
  200.       else {
  201.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                   ^
  202.           /* Does this stack frame have anything to release? */
  203.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:274:1: <LHS trace>
272.   }
273.   
274. > static unsigned int BN_STACK_pop(BN_STACK *st)
275.   {
276.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:274:1: Parameter `st->depth`
    272.   }
    273.   
    274. > static unsigned int BN_STACK_pop(BN_STACK *st)
    275.   {
    276.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:276:12: Binary operation: ([0, 5+max(0, ctx->stack.depth)] - 1):unsigned32 by call to `BN_CTX_end` 
    274.   static unsigned int BN_STACK_pop(BN_STACK *st)
    275.   {
    276.       return st->indexes[--(st->depth)];
                      ^
    277.   }
    278.   

static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['static\nint ec_GF2m_simple_ladder_post(const EC_GROUP *group,\n                               EC_POINT *r, EC_POINT *s,\n                               EC_POINT *p, BN_CTX *ctx)\n{\n    int ret = 0;\n    BIGNUM *t0, *t1, *t2 = NULL;\n    if (BN_is_zero(r->Z))\n        return EC_POINT_set_to_infinity(group, r);\n    if (BN_is_zero(s->Z)) {\n        if (!EC_POINT_copy(r, p)\n            || !EC_POINT_invert(group, r, ctx)) {\n            ECerr(EC_F_EC_GF2M_SIMPLE_LADDER_POST, ERR_R_EC_LIB);\n            return 0;\n        }\n        return 1;\n    }\n    BN_CTX_start(ctx);\n    t0 = BN_CTX_get(ctx);\n    t1 = BN_CTX_get(ctx);\n    t2 = BN_CTX_get(ctx);\n    if (t2 == NULL) {\n        ECerr(EC_F_EC_GF2M_SIMPLE_LADDER_POST, ERR_R_MALLOC_FAILURE);\n        goto err;\n    }\n    if (!group->meth->field_mul(group, t0, r->Z, s->Z, ctx)\n        || !group->meth->field_mul(group, t1, p->X, r->Z, ctx)\n        || !BN_GF2m_add(t1, r->X, t1)\n        || !group->meth->field_mul(group, t2, p->X, s->Z, ctx)\n        || !group->meth->field_mul(group, r->Z, r->X, t2, ctx)\n        || !BN_GF2m_add(t2, t2, s->X)\n        || !group->meth->field_mul(group, t1, t1, t2, ctx)\n        || !group->meth->field_sqr(group, t2, p->X, ctx)\n        || !BN_GF2m_add(t2, p->Y, t2)\n        || !group->meth->field_mul(group, t2, t2, t0, ctx)\n        || !BN_GF2m_add(t1, t2, t1)\n        || !group->meth->field_mul(group, t2, p->X, t0, ctx)\n        || !BN_GF2m_mod_inv(t2, t2, group->field, ctx)\n        || !group->meth->field_mul(group, t1, t1, t2, ctx)\n        || !group->meth->field_mul(group, r->X, r->Z, t2, ctx)\n        || !BN_GF2m_add(t2, p->X, r->X)\n        || !group->meth->field_mul(group, t2, t2, t1, ctx)\n        || !BN_GF2m_add(r->Y, p->Y, t2)\n        || !BN_one(r->Z))\n        goto err;\n    r->Z_is_one = 1;\n    BN_set_negative(r->X, 0);\n    BN_set_negative(r->Y, 0);\n    ret = 1;\n err:\n    BN_CTX_end(ctx);\n    return ret;\n}', 'void BN_CTX_start(BN_CTX *ctx)\n{\n    CTXDBG_ENTRY("BN_CTX_start", ctx);\n    if (ctx->err_stack || ctx->too_many)\n        ctx->err_stack++;\n    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {\n        BNerr(BN_F_BN_CTX_START, BN_R_TOO_MANY_TEMPORARY_VARIABLES);\n        ctx->err_stack++;\n    }\n    CTXDBG_EXIT(ctx);\n}', 'void BN_CTX_end(BN_CTX *ctx)\n{\n    CTXDBG_ENTRY("BN_CTX_end", ctx);\n    if (ctx->err_stack)\n        ctx->err_stack--;\n    else {\n        unsigned int fp = BN_STACK_pop(&ctx->stack);\n        if (fp < ctx->used)\n            BN_POOL_release(&ctx->pool, ctx->used - fp);\n        ctx->used = fp;\n        ctx->too_many = 0;\n    }\n    CTXDBG_EXIT(ctx);\n}', 'static unsigned int BN_STACK_pop(BN_STACK *st)\n{\n    return st->indexes[--(st->depth)];\n}']