test/bntest.c:610: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `BN_GF2m_mod_inv`.
Showing all 19 steps of the trace


test/bntest.c:610:13: Call
608.           BN_bntest_rand(a, 512, 0, 0);
609.           for (j = 0; j < 2; j++) {
610.               BN_GF2m_mod_inv(c, a, b[j], ctx);
                   ^
611.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
612.               /* Test that ((1/a)*a) = 1. */

crypto/bn/bn_gf2m.c:550:1: Parameter `ctx->stack.depth`
  548.    * Curve Cryptography Over Binary Fields".
  549.    */
  550. > int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  551.   {
  552.       BIGNUM *b, *c = NULL, *u = NULL, *v = NULL, *tmp;

crypto/bn/bn_gf2m.c:558:5: Call
  556.       bn_check_top(p);
  557.   
  558.       BN_CTX_start(ctx);
             ^
  559.   
  560.       b = BN_CTX_get(ctx);

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

crypto/bn/bn_gf2m.c:712:5: Call
  710.       bn_correct_top(v);
  711.   # endif
  712.       BN_CTX_end(ctx);
             ^
  713.       return ret;
  714.   }

crypto/bn/bn_ctx.c:195:1: Parameter `ctx->stack.depth`
    193.   }
    194.   
    195. > void BN_CTX_end(BN_CTX *ctx)
    196.   {
    197.       CTXDBG_ENTRY("BN_CTX_end", ctx);

test/bntest.c:611:13: Call
609.           for (j = 0; j < 2; j++) {
610.               BN_GF2m_mod_inv(c, a, b[j], ctx);
611.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
                   ^
612.               /* Test that ((1/a)*a) = 1. */
613.               if (!TEST_BN_eq_one(d))

crypto/bn/bn_gf2m.c:463:1: Parameter `ctx->stack.depth`
  461.    * BN_GF2m_mod_mul_arr function.
  462.    */
  463. > int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
  464.                       const BIGNUM *p, BN_CTX *ctx)
  465.   {

test/bntest.c:610:13: Call
608.           BN_bntest_rand(a, 512, 0, 0);
609.           for (j = 0; j < 2; j++) {
610.               BN_GF2m_mod_inv(c, a, b[j], ctx);
                   ^
611.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
612.               /* Test that ((1/a)*a) = 1. */

crypto/bn/bn_gf2m.c:558:5: Call
  556.       bn_check_top(p);
  557.   
  558.       BN_CTX_start(ctx);
             ^
  559.   
  560.       b = 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/bn/bn_gf2m.c:712:5: Call
  710.       bn_correct_top(v);
  711.   # endif
  712.       BN_CTX_end(ctx);
             ^
  713.       return ret;
  714.   }

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_GF2m_mod_inv` 
      271.   static unsigned int BN_STACK_pop(BN_STACK *st)
      272.   {
      273.       return st->indexes[--(st->depth)];
                        ^
      274.   }
      275.   
