crypto/bn/bn_gf2m.c:966: 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:947:1: Parameter `ctx->stack.depth`
945.    * convenience; for best performance, use the BN_GF2m_mod_div function.
946.    */
947. > int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *yy, const BIGNUM *xx,
948.                           const int p[], BN_CTX *ctx)
949.   {

crypto/bn/bn_gf2m.c:956:5: Call
954.       bn_check_top(xx);
955.   
956.       BN_CTX_start(ctx);
           ^
957.       if ((field = BN_CTX_get(ctx)) == NULL)
958.           goto err;

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

crypto/bn/bn_gf2m.c:966:5: Call
964.   
965.    err:
966.       BN_CTX_end(ctx);
           ^
967.       return ret;
968.   }

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

crypto/bn/bn_ctx.c:273:27: Call
  271.           ctx->err_stack--;
  272.       else {
  273.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                   ^
  274.           /* Does this stack frame have anything to release? */
  275.           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:12: 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,\n                        const int p[], BN_CTX *ctx)\n{\n    BIGNUM *field;\n    int ret = 0;\n    bn_check_top(yy);\n    bn_check_top(xx);\n    BN_CTX_start(ctx);\n    if ((field = BN_CTX_get(ctx)) == NULL)\n        goto err;\n    if (!BN_GF2m_arr2poly(p, field))\n        goto err;\n    ret = BN_GF2m_mod_div(r, yy, xx, field, ctx);\n    bn_check_top(r);\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}']