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


crypto/bn/bn_exp.c:349:14: Call
347.           if ((mont = BN_MONT_CTX_new()) == NULL)
348.               goto err;
349.           if (!BN_MONT_CTX_set(mont, m, ctx))
                    ^
350.               goto err;
351.       }

crypto/bn/bn_mont.c:341:14: Call
  339.           else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  340.               goto err;
  341.           if (!BN_lshift(Ri, Ri, BN_BITS2))
                      ^
  342.               goto err;           /* R*Ri */
  343.           if (!BN_is_zero(Ri)) {

crypto/bn/bn_shift.c:83:1: Parameter `r->top`
    81.   }
    82.   
    83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
    84.   {
    85.       int i, nw, lb, rb;

crypto/bn/bn_exp.c:354:14: Call
352.   
353.       if (a->neg || BN_ucmp(a, m) >= 0) {
354.           if (!BN_nnmod(val[0], a, m, ctx))
                    ^
355.               goto err;
356.           aa = val[0];

crypto/bn/bn_mod.c:13:1: Parameter `*r->d`
  11.   #include "bn_lcl.h"
  12.   
  13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
  14.   {
  15.       /*

crypto/bn/bn_mod.c:20:11: Call
  18.        */
  19.   
  20.       if (!(BN_mod(r, m, d, ctx)))
                  ^
  21.           return 0;
  22.       if (!r->neg)

crypto/bn/bn_div.c:137:1: Parameter `*rm->d`
    135.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    136.    */
    137. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    138.              BN_CTX *ctx)
    139.   {

crypto/bn/bn_div.c:404:9: Call
    402.            */
    403.           int neg = num->neg;
    404.           BN_rshift(rm, snum, norm_shift);
                   ^
    405.           if (!BN_is_zero(rm))
    406.               rm->neg = neg;

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:948:1: Parameter `*a->d`
        946.   }
        947.   
        948. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        949.   {
        950.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:950:37: Call
        948.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
        949.   {
        950.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                   ^
        951.   }
        952.   

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

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

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

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

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

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

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