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


test/bntest.c:967:17: Call
965.               goto err;
966.           for (j = 0; j < 2; j++) {
967.               t = BN_GF2m_mod_solve_quad(c, a, b[j], ctx);
                       ^
968.               if (t) {
969.                   s++;

crypto/bn/bn_gf2m.c:1087:1: Parameter `ctx->stack.depth`
  1085.    * for best performance, use the BN_GF2m_mod_solve_quad_arr function.
  1086.    */
  1087. > int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
  1088.                              BN_CTX *ctx)
  1089.   {

test/bntest.c:967:17: Call
965.               goto err;
966.           for (j = 0; j < 2; j++) {
967.               t = BN_GF2m_mod_solve_quad(c, a, b[j], ctx);
                       ^
968.               if (t) {
969.                   s++;

crypto/bn/bn_gf2m.c:1087:1: Parameter `ctx->stack.depth`
  1085.    * for best performance, use the BN_GF2m_mod_solve_quad_arr function.
  1086.    */
  1087. > int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
  1088.                              BN_CTX *ctx)
  1089.   {

test/bntest.c:970:23: Call
968.               if (t) {
969.                   s++;
970.                   if (!(TEST_true(BN_GF2m_mod_sqr(d, c, b[j], ctx))
                             ^
971.                           && TEST_true(BN_GF2m_add(d, c, d))
972.                           && TEST_true(BN_GF2m_mod(e, a, b[j]))

crypto/bn/bn_gf2m.c:524:1: Parameter `ctx->stack.depth`
  522.    * use the BN_GF2m_mod_sqr_arr function.
  523.    */
  524. > int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  525.   {
  526.       int ret = 0;

crypto/bn/bn_gf2m.c:539:11: Call
  537.           goto err;
  538.       }
  539.       ret = BN_GF2m_mod_sqr_arr(r, a, arr, ctx);
                   ^
  540.       bn_check_top(r);
  541.    err:

crypto/bn/bn_gf2m.c:496:5: Call
    494.   
    495.       bn_check_top(a);
    496.       BN_CTX_start(ctx);
               ^
    497.       if ((s = BN_CTX_get(ctx)) == NULL)
    498.           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:514:5: Call
    512.       ret = 1;
    513.    err:
    514.       BN_CTX_end(ctx);
               ^
    515.       return ret;
    516.   }

crypto/bn/bn_ctx.c:185:1: Parameter `*ctx->stack.indexes`
      183.   }
      184.   
      185. > void BN_CTX_end(BN_CTX *ctx)
      186.   {
      187.       if (ctx == NULL)

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

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

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

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

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

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