crypto/bn/bn_mont.c:428: error: BUFFER_OVERRUN_L3
  Offset: [-1, 0] Size: 2 by call to `BN_mod_inverse`.
Showing all 13 steps of the trace


crypto/bn/bn_mont.c:349:1: Array declaration
347.   }
348.   
349. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
350.   {
351.       int ret = 0;

crypto/bn/bn_mont.c:371:9: Assignment
369.   
370.           bn_init(&tmod);
371.           tmod.d = buf;
               ^
372.           tmod.dmax = 2;
373.           tmod.neg = 0;

crypto/bn/bn_mont.c:428:14: Call
426.           tmod.top = buf[0] != 0 ? 1 : 0;
427.           /* Ri = R^-1 mod N */
428.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                    ^
429.               goto err;
430.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:226:1: Parameter `*n->d`
  224.                                           BN_CTX *ctx);
  225.   
  226. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  227.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  228.   {

crypto/bn/bn_gcd.c:231:10: Call
  229.       BIGNUM *rv;
  230.       int noinv;
  231.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  232.       if (noinv)
  233.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:237:1: Parameter `*n->d`
    235.   }
    236.   
    237. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    238.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    239.                              int *pnoinv)

crypto/bn/bn_gcd.c:294:26: Call
    292.        */
    293.   
    294.       if (BN_is_odd(n) && (BN_num_bits(n) <= (BN_BITS <= 32 ? 450 : 2048))) {
                                    ^
    295.           /*
    296.            * Binary inversion algorithm; requires odd modulus. This is faster

crypto/bn/bn_lib.c:214:1: <Offset trace>
212.   }
213.   
214. > int BN_num_bits(const BIGNUM *a)
215.   {
216.       int i = a->top - 1;

crypto/bn/bn_lib.c:214:1: Parameter `a->top`
      212.   }
      213.   
      214. > int BN_num_bits(const BIGNUM *a)
      215.   {
      216.       int i = a->top - 1;

crypto/bn/bn_lib.c:216:5: Assignment
      214.   int BN_num_bits(const BIGNUM *a)
      215.   {
      216.       int i = a->top - 1;
                 ^
      217.       bn_check_top(a);
      218.   

crypto/bn/bn_lib.c:214:1: <Length trace>
212.   }
213.   
214. > int BN_num_bits(const BIGNUM *a)
215.   {
216.       int i = a->top - 1;

crypto/bn/bn_lib.c:214:1: Parameter `*a->d`
      212.   }
      213.   
      214. > int BN_num_bits(const BIGNUM *a)
      215.   {
      216.       int i = a->top - 1;

crypto/bn/bn_lib.c:221:47: Array access: Offset: [-1, 0] Size: 2 by call to `BN_mod_inverse` 
      219.       if (BN_is_zero(a))
      220.           return 0;
      221.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
                                                           ^
      222.   }
      223.   
