crypto/bn/bn_exp.c:243: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, +oo] by call to `BN_mod_mul_reciprocal`.
Showing all 21 steps of the trace


crypto/bn/bn_exp.c:203:13: Call
201.               goto err;
202.           aa->neg = 0;
203.           if (BN_RECP_CTX_set(&recp, aa, ctx) <= 0)
                   ^
204.               goto err;
205.       } else {

crypto/bn/bn_recp.c:45:1: Parameter `*recp->Nr.d`
  43.   }
  44.   
  45. > int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
  46.   {
  47.       if (!BN_copy(&(recp->N), d))

crypto/bn/bn_exp.c:243:22: Call
241.           if (BN_is_bit_set(p, wstart) == 0) {
242.               if (!start)
243.                   if (!BN_mod_mul_reciprocal(r, r, r, &recp, ctx))
                            ^
244.                       goto err;
245.               if (wstart == 0)

crypto/bn/bn_recp.c:55:1: Parameter `*recp->Nr.d`
  53.   }
  54.   
  55. > int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
  56.                             BN_RECP_CTX *recp, BN_CTX *ctx)
  57.   {

crypto/bn/bn_recp.c:77:11: Call
  75.           ca = x;                 /* Just do the mod */
  76.   
  77.       ret = BN_div_recp(NULL, r, ca, recp, ctx);
                  ^
  78.    err:
  79.       BN_CTX_end(ctx);

crypto/bn/bn_recp.c:91:29: Call
    89.   
    90.       BN_CTX_start(ctx);
    91.       d = (dv != NULL) ? dv : BN_CTX_get(ctx);
                                      ^
    92.       r = (rem != NULL) ? rem : BN_CTX_get(ctx);
    93.       a = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:229:5: Call
      227.       }
      228.       /* OK, make sure the returned bignum is "zero" */
      229.       BN_zero(ret);
                 ^
      230.       ctx->used++;
      231.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:365:15: Assignment
        363.       a->neg = 0;
        364.       a->d[0] = w;
        365.       a->top = (w ? 1 : 0);
                             ^
        366.       a->flags &= ~BN_FLG_FIXED_TOP;
        367.       bn_check_top(a);

crypto/bn/bn_lib.c:365:5: Assignment
        363.       a->neg = 0;
        364.       a->d[0] = w;
        365.       a->top = (w ? 1 : 0);
                   ^
        366.       a->flags &= ~BN_FLG_FIXED_TOP;
        367.       bn_check_top(a);

crypto/bn/bn_recp.c:132:10: Call
    130.        *    = |m/N|
    131.        */
    132.       if (!BN_rshift(a, m, recp->num_bits))
                    ^
    133.           goto err;
    134.       if (!BN_mul(b, a, &(recp->Nr), ctx))

crypto/bn/bn_shift.c:122:1: Parameter `*r->d`
      120.   }
      121.   
      122. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
      123.   {
      124.       int i, j, nw, lb, rb;

crypto/bn/bn_shift.c:145:13: Call
      143.       i = (BN_num_bits(a) - n + (BN_BITS2 - 1)) / BN_BITS2;
      144.       if (r != a) {
      145.           if (bn_wexpand(r, i) == NULL)
                         ^
      146.               return 0;
      147.           r->neg = a->neg;

crypto/bn/bn_lib.c:942:1: Parameter `*a->d`
        940.   }
        941.   
        942. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        943.   {
        944.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:944:37: Call
        942.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
        943.   {
        944.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                   ^
        945.   }
        946.   

crypto/bn/bn_lib.c:244:1: Parameter `*b->d`
          242.    */
          243.   
          244. > BIGNUM *bn_expand2(BIGNUM *b, int words)
          245.   {
          246.       if (words > b->dmax) {

crypto/bn/bn_lib.c:247:23: Call
          245.   {
          246.       if (words > b->dmax) {
          247.           BN_ULONG *a = bn_expand_internal(b, words);
                                       ^
          248.           if (!a)
          249.               return NULL;

crypto/bn/bn_lib.c:208:1: <Offset trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `b->top`
            206.   /* This is used by bn_expand2() */
            207.   /* The caller MUST check that words > b->dmax before calling this */
            208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
            209.   {
            210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: <Length trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `*b->d`
            206.   /* This is used by bn_expand2() */
            207.   /* The caller MUST check that words > b->dmax before calling this */
            208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
            209.   {
            210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:231:9: Array access: Offset added: [8, +oo] Size: [0, +oo] by call to `BN_mod_mul_reciprocal` 
            229.       assert(b->top <= words);
            230.       if (b->top > 0)
            231.           memcpy(a, b->d, sizeof(*a) * b->top);
                           ^
            232.   
            233.       return a;
