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


crypto/bn/bn_mont.c:263:1: Array declaration
261.   }
262.   
263. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
264.   {
265.       int i, ret = 0;

crypto/bn/bn_mont.c:287:9: Assignment
285.   
286.           bn_init(&tmod);
287.           tmod.d = buf;
               ^
288.           tmod.dmax = 2;
289.           tmod.neg = 0;

crypto/bn/bn_mont.c:351:19: Call
349.           if (BN_is_one(&tmod))
350.               BN_zero(Ri);
351.           else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                         ^
352.               goto err;
353.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:124:1: Parameter `*n->d`
  122.                                           BN_CTX *ctx);
  123.   
  124. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  125.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  126.   {

crypto/bn/bn_gcd.c:129:10: Call
  127.       BIGNUM *rv;
  128.       int noinv;
  129.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  130.       if (noinv)
  131.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:135:1: Parameter `*n->d`
    133.   }
    134.   
    135. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    136.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    137.                              int *pnoinv)

crypto/bn/bn_gcd.c:155:16: Call
    153.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    154.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    155.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    156.       }
    157.   

crypto/bn/bn_gcd.c:458:1: Parameter `*n->d`
      456.    * not contain branches that may leak sensitive information.
      457.    */
      458. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      459.                                           const BIGNUM *a, const BIGNUM *n,
      460.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:609:18: Call
      607.                   goto err;
      608.           } else {
      609.               if (!BN_nnmod(R, Y, n, ctx))
                              ^
      610.                   goto err;
      611.           }

crypto/bn/bn_mod.c:13:1: Parameter `*d->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:209:1: <Offset trace>
207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
208.    */
209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
210.              BN_CTX *ctx)
211.   {

crypto/bn/bn_div.c:209:1: Parameter `divisor->top`
          207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
          208.    */
          209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
          210.              BN_CTX *ctx)
          211.   {

crypto/bn/bn_div.c:214:9: Call
          212.       int ret;
          213.   
          214.       if (BN_is_zero(divisor)) {
                         ^
          215.           BNerr(BN_F_BN_DIV, BN_R_DIV_BY_ZERO);
          216.           return 0;

crypto/bn/bn_lib.c:866:1: Parameter `a->top`
            864.   }
            865.   
            866. > int BN_is_zero(const BIGNUM *a)
            867.   {
            868.       return a->top == 0;

crypto/bn/bn_div.c:209:1: <Length trace>
207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
208.    */
209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
210.              BN_CTX *ctx)
211.   {

crypto/bn/bn_div.c:209:1: Parameter `*divisor->d`
          207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
          208.    */
          209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
          210.              BN_CTX *ctx)
          211.   {

crypto/bn/bn_div.c:224:9: Array access: Offset: [-1, 0] Size: 2 by call to `BN_mod_inverse` 
          222.        * BN_DEBUG builds)
          223.        */
          224.       if (divisor->d[divisor->top - 1] == 0) {
                         ^
          225.           BNerr(BN_F_BN_DIV, BN_R_NOT_INITIALIZED);
          226.           return 0;
