crypto/ec/ec_key.c:391: 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/ec_key.c:354:5: Call
352.           return 0;
353.   
354.       BN_CTX_start(ctx);
           ^
355.       point = EC_POINT_new(key->group);
356.   

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/ec_key.c:391:5: Call
389.   
390.    err:
391.       BN_CTX_end(ctx);
           ^
392.       BN_CTX_free(ctx);
393.       EC_POINT_free(point);

crypto/bn/bn_ctx.c:185:1: Parameter `*ctx->stack.indexes`
  183.   }
  184.   
  185. > void BN_CTX_end(BN_CTX *ctx)
  186.   {
  187.       CTXDBG("ENTER BN_CTX_end()", ctx);

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

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

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

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

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

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

static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,\n                                             BIGNUM *y)\n{\n    BN_CTX *ctx = NULL;\n    BIGNUM *tx, *ty;\n    EC_POINT *point = NULL;\n    int ok = 0;\n    if (key == NULL || key->group == NULL || x == NULL || y == NULL) {\n        ECerr(EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES,\n              ERR_R_PASSED_NULL_PARAMETER);\n        return 0;\n    }\n    ctx = BN_CTX_new();\n    if (ctx == NULL)\n        return 0;\n    BN_CTX_start(ctx);\n    point = EC_POINT_new(key->group);\n    if (point == NULL)\n        goto err;\n    tx = BN_CTX_get(ctx);\n    ty = BN_CTX_get(ctx);\n    if (ty == NULL)\n        goto err;\n    if (!EC_POINT_set_affine_coordinates(key->group, point, x, y, ctx))\n        goto err;\n    if (!EC_POINT_get_affine_coordinates(key->group, point, tx, ty, ctx))\n        goto err;\n    if (BN_cmp(x, tx) || BN_cmp(y, ty)\n        || (BN_cmp(x, key->group->field) >= 0)\n        || (BN_cmp(y, key->group->field) >= 0)) {\n        ECerr(EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES,\n              EC_R_COORDINATES_OUT_OF_RANGE);\n        goto err;\n    }\n    if (!EC_KEY_set_public_key(key, point))\n        goto err;\n    if (EC_KEY_check_key(key) == 0)\n        goto err;\n    ok = 1;\n err:\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n    EC_POINT_free(point);\n    return ok;\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    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}']