crypto/bn/bn_exp2.c:185: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `BN_to_montgomery`.
Showing all 20 steps of the trace


crypto/bn/bn_exp2.c:118:1: Parameter `ctx->stack.depth`
116.   #define TABLE_SIZE      32
117.   
118. > int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,
119.                        const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
120.                        BN_CTX *ctx, BN_MONT_CTX *in_mont)

crypto/bn/bn_exp2.c:150:5: Call
148.       bits = (bits1 > bits2) ? bits1 : bits2;
149.   
150.       BN_CTX_start(ctx);
           ^
151.       d = BN_CTX_get(ctx);
152.       r = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:236:1: Parameter `ctx->stack.depth`
  234.   }
  235.   
  236. > void BN_CTX_start(BN_CTX *ctx)
  237.   {
  238.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_exp2.c:185:10: Call
183.       }
184.   
185.       if (!BN_to_montgomery(val1[0], a_mod_m, mont, ctx))
                ^
186.           goto err;
187.       if (window1 > 1) {

crypto/bn/bn_lib.c:924:1: Parameter `ctx->stack.depth`
  922.   }
  923.   
  924. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  925.                        BN_CTX *ctx)
  926.   {

crypto/bn/bn_lib.c:927:12: Call
  925.                        BN_CTX *ctx)
  926.   {
  927.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                    ^
  928.   }
  929.   

crypto/bn/bn_mont.c:128:1: Parameter `ctx->stack.depth`
    126.   #endif
    127.   
    128. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    129.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    130.   {

crypto/bn/bn_mont.c:148:5: Call
    146.   #endif
    147.   
    148.       BN_CTX_start(ctx);
               ^
    149.       tmp = BN_CTX_get(ctx);
    150.       if (tmp == NULL)

crypto/bn/bn_ctx.c:236:1: Parameter `ctx->stack.depth`
      234.   }
      235.   
      236. > void BN_CTX_start(BN_CTX *ctx)
      237.   {
      238.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_mont.c:158:14: Call
    156.               goto err;
    157.       } else {
    158.           if (!BN_mul(tmp, a, b, ctx))
                        ^
    159.               goto err;
    160.       }

crypto/bn/bn_mul.c:909:5: Call
      907.       top = al + bl;
      908.   
      909.       BN_CTX_start(ctx);
                 ^
      910.       if ((r == a) || (r == b)) {
      911.           if ((rr = BN_CTX_get(ctx)) == NULL)

crypto/bn/bn_ctx.c:236:1: Parameter `*ctx->stack.indexes`
        234.   }
        235.   
        236. > void BN_CTX_start(BN_CTX *ctx)
        237.   {
        238.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_mul.c:1033:5: Call
      1031.    err:
      1032.       bn_check_top(r);
      1033.       BN_CTX_end(ctx);
                  ^
      1034.       return (ret);
      1035.   }

crypto/bn/bn_ctx.c:250:1: Parameter `*ctx->stack.indexes`
        248.   }
        249.   
        250. > void BN_CTX_end(BN_CTX *ctx)
        251.   {
        252.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:256:27: Call
        254.           ctx->err_stack--;
        255.       else {
        256.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                         ^
        257.           /* Does this stack frame have anything to release? */
        258.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:326:1: <Offset trace>
324.   }
325.   
326. > static unsigned int BN_STACK_pop(BN_STACK *st)
327.   {
328.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:326:1: Parameter `st->depth`
          324.   }
          325.   
          326. > static unsigned int BN_STACK_pop(BN_STACK *st)
          327.   {
          328.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:326:1: <Length trace>
324.   }
325.   
326. > static unsigned int BN_STACK_pop(BN_STACK *st)
327.   {
328.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:326:1: Parameter `*st->indexes`
          324.   }
          325.   
          326. > static unsigned int BN_STACK_pop(BN_STACK *st)
          327.   {
          328.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:328:12: Array access: Offset: [-1, +oo] Size: [1, +oo] by call to `BN_to_montgomery` 
          326.   static unsigned int BN_STACK_pop(BN_STACK *st)
          327.   {
          328.       return st->indexes[--(st->depth)];
                            ^
          329.   }
          330.   
