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


test/bntest.c:663:13: Call
661.           BN_bntest_rand(c, 512, 0, 0);
662.           for (j = 0; j < 2; j++) {
663.               BN_GF2m_mod_div(d, a, c, b[j], ctx);
                   ^
664.               BN_GF2m_mod_mul(e, d, c, b[j], ctx);
665.               BN_GF2m_mod_div(f, a, e, b[j], ctx);

crypto/bn/bn_gf2m.c:760:1: Parameter `ctx->stack.depth`
  758.    * or y, x could equal y.
  759.    */
  760. > int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *y, const BIGNUM *x,
  761.                       const BIGNUM *p, BN_CTX *ctx)
  762.   {

crypto/bn/bn_gf2m.c:770:5: Call
  768.       bn_check_top(p);
  769.   
  770.       BN_CTX_start(ctx);
             ^
  771.       xinv = BN_CTX_get(ctx);
  772.       if (xinv == NULL)

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:783:5: Call
  781.   
  782.    err:
  783.       BN_CTX_end(ctx);
             ^
  784.       return ret;
  785.   }

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:664:13: Call
662.           for (j = 0; j < 2; j++) {
663.               BN_GF2m_mod_div(d, a, c, b[j], ctx);
664.               BN_GF2m_mod_mul(e, d, c, b[j], ctx);
                   ^
665.               BN_GF2m_mod_div(f, a, e, b[j], ctx);
666.               /* Test that ((a/c)*c)/a = 1. */

crypto/bn/bn_gf2m.c:473:1: Parameter `ctx->stack.depth`
  471.    * BN_GF2m_mod_mul_arr function.
  472.    */
  473. > int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
  474.                       const BIGNUM *p, BN_CTX *ctx)
  475.   {

test/bntest.c:665:13: Call
663.               BN_GF2m_mod_div(d, a, c, b[j], ctx);
664.               BN_GF2m_mod_mul(e, d, c, b[j], ctx);
665.               BN_GF2m_mod_div(f, a, e, b[j], ctx);
                   ^
666.               /* Test that ((a/c)*c)/a = 1. */
667.               if (!TEST_BN_eq_one(f))

crypto/bn/bn_gf2m.c:760:1: Parameter `ctx->stack.depth`
  758.    * or y, x could equal y.
  759.    */
  760. > int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *y, const BIGNUM *x,
  761.                       const BIGNUM *p, BN_CTX *ctx)
  762.   {

crypto/bn/bn_gf2m.c:770:5: Call
  768.       bn_check_top(p);
  769.   
  770.       BN_CTX_start(ctx);
             ^
  771.       xinv = BN_CTX_get(ctx);
  772.       if (xinv == NULL)

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:783:5: Call
  781.   
  782.    err:
  783.       BN_CTX_end(ctx);
             ^
  784.       return ret;
  785.   }

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:663:13: Call
661.           BN_bntest_rand(c, 512, 0, 0);
662.           for (j = 0; j < 2; j++) {
663.               BN_GF2m_mod_div(d, a, c, b[j], ctx);
                   ^
664.               BN_GF2m_mod_mul(e, d, c, b[j], ctx);
665.               BN_GF2m_mod_div(f, a, e, b[j], ctx);

crypto/bn/bn_gf2m.c:770:5: Call
  768.       bn_check_top(p);
  769.   
  770.       BN_CTX_start(ctx);
             ^
  771.       xinv = BN_CTX_get(ctx);
  772.       if (xinv == NULL)

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:783:5: Call
  781.   
  782.    err:
  783.       BN_CTX_end(ctx);
             ^
  784.       return ret;
  785.   }

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