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


test/bntest.c:763:13: Call
761.           BN_bntest_rand(a, 512, 0, 0);
762.           for (j = 0; j < 2; j++) {
763.               BN_GF2m_mod_inv(c, a, b[j], ctx);
                   ^
764.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
765.               /* Test that ((1/a)*a) = 1. */

crypto/bn/bn_gf2m.c:724:1: Parameter `ctx->stack.depth`
  722.    * But it does eliminate first order deduction on the input.
  723.    */
  724. > int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  725.   {
  726.       BIGNUM *b = NULL;

crypto/bn/bn_gf2m.c:729:5: Call
  727.       int ret = 0;
  728.   
  729.       BN_CTX_start(ctx);
             ^
  730.       if ((b = BN_CTX_get(ctx)) == NULL)
  731.           goto err;

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

crypto/bn/bn_gf2m.c:730:14: Call
  728.   
  729.       BN_CTX_start(ctx);
  730.       if ((b = BN_CTX_get(ctx)) == NULL)
                      ^
  731.           goto err;
  732.   

crypto/bn/bn_ctx.c:202:1: Parameter `ctx->stack.depth`
    200.   }
    201.   
    202. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
    203.   {
    204.       BIGNUM *ret;

crypto/bn/bn_gf2m.c:755:5: Call
  753.   
  754.    err:
  755.       BN_CTX_end(ctx);
             ^
  756.       return ret;
  757.   }

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

test/bntest.c:764:13: Call
762.           for (j = 0; j < 2; j++) {
763.               BN_GF2m_mod_inv(c, a, b[j], ctx);
764.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
                   ^
765.               /* Test that ((1/a)*a) = 1. */
766.               if (!TEST_BN_eq_one(d))

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

test/bntest.c:763:13: Call
761.           BN_bntest_rand(a, 512, 0, 0);
762.           for (j = 0; j < 2; j++) {
763.               BN_GF2m_mod_inv(c, a, b[j], ctx);
                   ^
764.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
765.               /* Test that ((1/a)*a) = 1. */

crypto/bn/bn_gf2m.c:724:1: Parameter `ctx->stack.depth`
  722.    * But it does eliminate first order deduction on the input.
  723.    */
  724. > int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  725.   {
  726.       BIGNUM *b = NULL;

crypto/bn/bn_gf2m.c:729:5: Call
  727.       int ret = 0;
  728.   
  729.       BN_CTX_start(ctx);
             ^
  730.       if ((b = BN_CTX_get(ctx)) == NULL)
  731.           goto err;

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

crypto/bn/bn_gf2m.c:730:14: Call
  728.   
  729.       BN_CTX_start(ctx);
  730.       if ((b = BN_CTX_get(ctx)) == NULL)
                      ^
  731.           goto err;
  732.   

crypto/bn/bn_ctx.c:202:1: Parameter `ctx->stack.depth`
    200.   }
    201.   
    202. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
    203.   {
    204.       BIGNUM *ret;

crypto/bn/bn_gf2m.c:741:10: Call
  739.   
  740.       /* r := a * b */
  741.       if (!BN_GF2m_mod_mul(r, a, b, p, ctx))
                  ^
  742.           goto err;
  743.   

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

crypto/bn/bn_gf2m.c:481:11: Call
    479.           goto err;
    480.       }
    481.       ret = BN_GF2m_mod_mul_arr(r, a, b, arr, ctx);
                     ^
    482.       bn_check_top(r);
    483.    err:

crypto/bn/bn_gf2m.c:424:5: Call
      422.       }
      423.   
      424.       BN_CTX_start(ctx);
                 ^
      425.       if ((s = BN_CTX_get(ctx)) == NULL)
      426.           goto err;

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/bn/bn_gf2m.c:454:5: Call
      452.   
      453.    err:
      454.       BN_CTX_end(ctx);
                 ^
      455.       return ret;
      456.   }

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_GF2m_mod_inv` 
          266.   static unsigned int BN_STACK_pop(BN_STACK *st)
          267.   {
          268.       return st->indexes[--(st->depth)];
                            ^
          269.   }
          270.   
