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


crypto/bn/bn_exp.c:745:14: Assignment
743.           /* 2^(top*BN_BITS2) - m */
744.           tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
745.           for (i = 1; i < top; i++)
                    ^
746.               tmp.d[i] = (~m->d[i]) & BN_MASK2;
747.           tmp.top = top;

crypto/bn/bn_exp.c:1051:14: Call
1049.           bits -= window0;
1050.           wvalue = bn_get_bits(p, bits) & wmask;
1051.           if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
                     ^
1052.                                               window))
1053.               goto err;

crypto/bn/bn_exp.c:520:1: Parameter `top`
  518.   }
  519.   
  520. > static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top,
  521.                                             unsigned char *buf, int idx,
  522.                                             int window)

crypto/bn/bn_exp.c:577:5: Assignment
  575.       }
  576.   
  577.       b->top = top;
             ^
  578.       bn_correct_top(b);
  579.       return 1;

crypto/bn/bn_exp.c:578:5: Call
  576.   
  577.       b->top = top;
  578.       bn_correct_top(b);
             ^
  579.       return 1;
  580.   }

crypto/bn/bn_lib.c:946:1: Parameter `a->top`
    944.   }
    945.   
    946. > void bn_correct_top(BIGNUM *a)
    947.   {
    948.       BN_ULONG *ftl;

crypto/bn/bn_exp.c:1102:10: Call
1100.       } else
1101.   #endif
1102.       if (!BN_from_montgomery(rr, &tmp, mont, ctx))
                 ^
1103.           goto err;
1104.       ret = 1;

crypto/bn/bn_mont.c:151:1: Parameter `a->top`
  149.   #endif                          /* MONT_WORD */
  150.   
  151. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
  152.                          BN_CTX *ctx)
  153.   {

crypto/bn/bn_mont.c:159:34: Call
  157.   
  158.       BN_CTX_start(ctx);
  159.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a))
                                          ^
  160.           retn = BN_from_montgomery_word(ret, t, mont);
  161.       BN_CTX_end(ctx);

crypto/bn/bn_lib.c:285:1: <Offset trace>
283.   }
284.   
285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
286.   {
287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: Parameter `b->top`
    283.   }
    284.   
    285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    286.   {
    287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: <Length trace>
283.   }
284.   
285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
286.   {
287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: Parameter `*a->d`
    283.   }
    284.   
    285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    286.   {
    287.       bn_check_top(b);

crypto/bn/bn_lib.c:291:9: Call
    289.       if (a == b)
    290.           return a;
    291.       if (bn_wexpand(a, b->top) == NULL)
                   ^
    292.           return NULL;
    293.   

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

crypto/bn/bn_lib.c:295:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_from_montgomery` 
    293.   
    294.       if (b->top > 0)
    295.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                   ^
    296.   
    297.       a->top = b->top;
