crypto/ec/ecp_smpl.c:188: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `BN_CTX_end`.
Showing all 10 steps of the trace


crypto/ec/ecp_smpl.c:154:5: Call
152.       }
153.   
154.       BN_CTX_start(ctx);
           ^
155.       tmp_a = BN_CTX_get(ctx);
156.       if (tmp_a == NULL)

crypto/bn/bn_ctx.c:171:1: Parameter `*ctx->stack.indexes`
  169.   }
  170.   
  171. > void BN_CTX_start(BN_CTX *ctx)
  172.   {
  173.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/ec/ecp_smpl.c:188:5: Call
186.   
187.    err:
188.       BN_CTX_end(ctx);
           ^
189.       BN_CTX_free(new_ctx);
190.       return ret;

crypto/bn/bn_ctx.c:185:1: Parameter `*ctx->stack.indexes`
  183.   }
  184.   
  185. > void BN_CTX_end(BN_CTX *ctx)
  186.   {
  187.       if (ctx == NULL)

crypto/bn/bn_ctx.c:193:27: Call
  191.           ctx->err_stack--;
  192.       else {
  193.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                   ^
  194.           /* Does this stack frame have anything to release? */
  195.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:268:1: <Offset trace>
266.   }
267.   
268. > static unsigned int BN_STACK_pop(BN_STACK *st)
269.   {
270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:268:1: Parameter `st->depth`
    266.   }
    267.   
    268. > static unsigned int BN_STACK_pop(BN_STACK *st)
    269.   {
    270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:268:1: <Length trace>
266.   }
267.   
268. > static unsigned int BN_STACK_pop(BN_STACK *st)
269.   {
270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:268:1: Parameter `*st->indexes`
    266.   }
    267.   
    268. > static unsigned int BN_STACK_pop(BN_STACK *st)
    269.   {
    270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:270:12: Array access: Offset: [-1, +oo] Size: [1, +oo] by call to `BN_CTX_end` 
    268.   static unsigned int BN_STACK_pop(BN_STACK *st)
    269.   {
    270.       return st->indexes[--(st->depth)];
                      ^
    271.   }
    272.   

static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int ec_GFp_simple_group_set_curve(EC_GROUP *group,\n                                  const BIGNUM *p, const BIGNUM *a,\n                                  const BIGNUM *b, BN_CTX *ctx)\n{\n    int ret = 0;\n    BN_CTX *new_ctx = NULL;\n    BIGNUM *tmp_a;\n    if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) {\n        ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE, EC_R_INVALID_FIELD);\n        return 0;\n    }\n    if (ctx == NULL) {\n        ctx = new_ctx = BN_CTX_new();\n        if (ctx == NULL)\n            return 0;\n    }\n    BN_CTX_start(ctx);\n    tmp_a = BN_CTX_get(ctx);\n    if (tmp_a == NULL)\n        goto err;\n    if (!BN_copy(group->field, p))\n        goto err;\n    BN_set_negative(group->field, 0);\n    if (!BN_nnmod(tmp_a, a, p, ctx))\n        goto err;\n    if (group->meth->field_encode) {\n        if (!group->meth->field_encode(group, group->a, tmp_a, ctx))\n            goto err;\n    } else if (!BN_copy(group->a, tmp_a))\n        goto err;\n    if (!BN_nnmod(group->b, b, p, ctx))\n        goto err;\n    if (group->meth->field_encode)\n        if (!group->meth->field_encode(group, group->b, group->b, ctx))\n            goto err;\n    if (!BN_add_word(tmp_a, 3))\n        goto err;\n    group->a_is_minus3 = (0 == BN_cmp(tmp_a, group->field));\n    ret = 1;\n err:\n    BN_CTX_end(ctx);\n    BN_CTX_free(new_ctx);\n    return ret;\n}', 'void BN_CTX_start(BN_CTX *ctx)\n{\n    CTXDBG("ENTER 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("LEAVE BN_CTX_start()", ctx);\n}', 'void BN_CTX_end(BN_CTX *ctx)\n{\n    if (ctx == NULL)\n        return;\n    CTXDBG("ENTER 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("LEAVE BN_CTX_end()", ctx);\n}', 'static unsigned int BN_STACK_pop(BN_STACK *st)\n{\n    return st->indexes[--(st->depth)];\n}']