crypto/ec/ec2_smpl.c:659: 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/ec2_smpl.c:644:5: Call
642.       }
643.   
644.       BN_CTX_start(ctx);
           ^
645.       aX = BN_CTX_get(ctx);
646.       aY = BN_CTX_get(ctx);

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

crypto/ec/ec2_smpl.c:659:5: Call
657.   
658.    err:
659.       BN_CTX_end(ctx);
           ^
660.       BN_CTX_free(new_ctx);
661.       return ret;

crypto/bn/bn_ctx.c:195:1: Parameter `*ctx->stack.indexes`
  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:271:1: <Offset trace>
269.   }
270.   
271. > static unsigned int BN_STACK_pop(BN_STACK *st)
272.   {
273.       return st->indexes[--(st->depth)];

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

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

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

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

static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int ec_GF2m_simple_cmp(const EC_GROUP *group, const EC_POINT *a,\n                       const EC_POINT *b, BN_CTX *ctx)\n{\n    BIGNUM *aX, *aY, *bX, *bY;\n    BN_CTX *new_ctx = NULL;\n    int ret = -1;\n    if (EC_POINT_is_at_infinity(group, a)) {\n        return EC_POINT_is_at_infinity(group, b) ? 0 : 1;\n    }\n    if (EC_POINT_is_at_infinity(group, b))\n        return 1;\n    if (a->Z_is_one && b->Z_is_one) {\n        return ((BN_cmp(a->X, b->X) == 0) && BN_cmp(a->Y, b->Y) == 0) ? 0 : 1;\n    }\n    if (ctx == NULL) {\n        ctx = new_ctx = BN_CTX_new();\n        if (ctx == NULL)\n            return -1;\n    }\n    BN_CTX_start(ctx);\n    aX = BN_CTX_get(ctx);\n    aY = BN_CTX_get(ctx);\n    bX = BN_CTX_get(ctx);\n    bY = BN_CTX_get(ctx);\n    if (bY == NULL)\n        goto err;\n    if (!EC_POINT_get_affine_coordinates_GF2m(group, a, aX, aY, ctx))\n        goto err;\n    if (!EC_POINT_get_affine_coordinates_GF2m(group, b, bX, bY, ctx))\n        goto err;\n    ret = ((BN_cmp(aX, bX) == 0) && BN_cmp(aY, bY) == 0) ? 0 : 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_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}']