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


crypto/dsa/dsa_ossl.c:415:5: Call
413.           return NULL;
414.   
415.       BN_CTX_start(ctx);
           ^
416.       if ((e = BN_CTX_get(ctx)) != NULL
417.               && BN_set_word(r, 2)

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/dsa/dsa_ossl.c:423:5: Call
421.       else
422.           BN_free(r);
423.       BN_CTX_end(ctx);
           ^
424.       return res;
425.   }

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:274:1: <Offset 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:274:1: <Length 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->indexes`
    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: Array access: Offset: [-1, +oo] Size: [1, +oo] 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 BIGNUM *dsa_mod_inverse_fermat(const BIGNUM *k, const BIGNUM *q,\n                                      BN_CTX *ctx)\n{\n    BIGNUM *res = NULL;\n    BIGNUM *r, *e;\n    if ((r = BN_new()) == NULL)\n        return NULL;\n    BN_CTX_start(ctx);\n    if ((e = BN_CTX_get(ctx)) != NULL\n            && BN_set_word(r, 2)\n            && BN_sub(e, q, r)\n            && BN_mod_exp_mont(r, k, e, q, ctx, NULL))\n        res = r;\n    else\n        BN_free(r);\n    BN_CTX_end(ctx);\n    return res;\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}']