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

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

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

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

crypto/bn/bn_lib.c:1000:1: Parameter `ctx->stack.depth`
  998.   }
  999.   
  1000. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  1001.                        BN_CTX *ctx)
  1002.   {

crypto/bn/bn_lib.c:1003:12: Call
  1001.                        BN_CTX *ctx)
  1002.   {
  1003.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                     ^
  1004.   }
  1005.   

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

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

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

crypto/bn/bn_mont.c:154:14: Call
    152.       bn_check_top(tmp);
    153.       if (a == b) {
    154.           if (!BN_sqr(tmp, a, ctx))
                        ^
    155.               goto err;
    156.       } else {

crypto/bn/bn_sqr.c:80:5: Call
      78.       }
      79.   
      80.       BN_CTX_start(ctx);
                ^
      81.       rr = (a != r) ? r : BN_CTX_get(ctx);
      82.       tmp = BN_CTX_get(ctx);

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

crypto/bn/bn_sqr.c:147:5: Call
      145.       bn_check_top(rr);
      146.       bn_check_top(tmp);
      147.       BN_CTX_end(ctx);
                 ^
      148.       return (ret);
      149.   }

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

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

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

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

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

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

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