crypto/rsa/rsa_chk.c:86: error: INTEGER_OVERFLOW_L2
  (0 - [0, max(1, `key->q->top`)]):unsigned64 by call to `BN_mul`.
Showing all 19 steps of the trace


crypto/rsa/rsa_chk.c:19:1: Parameter `key->q->top`
17.   }
18.   
19. > int RSA_check_key_ex(const RSA *key, BN_GENCB *cb)
20.   {
21.       BIGNUM *i, *j, *k, *l, *m;

crypto/rsa/rsa_chk.c:71:9: Call
69.   
70.       /* q prime? */
71.       if (BN_is_prime_ex(key->q, BN_prime_checks, NULL, cb) != 1) {
              ^
72.           ret = 0;
73.           RSAerr(RSA_F_RSA_CHECK_KEY_EX, RSA_R_Q_NOT_PRIME);

crypto/bn/bn_prime.c:145:1: Parameter `a->top`
  143.   }
  144.   
  145. > int BN_is_prime_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
  146.                      BN_GENCB *cb)
  147.   {

crypto/bn/bn_prime.c:148:12: Call
  146.                      BN_GENCB *cb)
  147.   {
  148.       return BN_is_prime_fasttest_ex(a, checks, ctx_passed, 0, cb);
                    ^
  149.   }
  150.   

crypto/bn/bn_prime.c:151:1: Parameter `a->top`
    149.   }
    150.   
    151. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
    152.                               int do_trial_division, BN_GENCB *cb)
    153.   {

crypto/bn/bn_prime.c:161:9: Call
    159.   
    160.       /* Take care of the really small primes 2 & 3 */
    161.       if (BN_is_word(a, 2) || BN_is_word(a, 3))
                   ^
    162.           return 1;
    163.   

crypto/bn/bn_lib.c:862:1: Parameter `a->top`
      860.   }
      861.   
      862. > int BN_is_word(const BIGNUM *a, const BN_ULONG w)
      863.   {
      864.       return BN_abs_is_word(a, w) && (!w || !a->neg);

crypto/bn/bn_lib.c:864:12: Call
      862.   int BN_is_word(const BIGNUM *a, const BN_ULONG w)
      863.   {
      864.       return BN_abs_is_word(a, w) && (!w || !a->neg);
                        ^
      865.   }
      866.   

crypto/bn/bn_lib.c:847:1: Parameter `a->top`
        845.   }
        846.   
        847. > int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
        848.   {
        849.       return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));

crypto/rsa/rsa_chk.c:86:10: Call
84.   
85.       /* n = p*q * r_3...r_i? */
86.       if (!BN_mul(i, key->p, key->q, ctx)) {
               ^
87.           ret = -1;
88.           goto err;

crypto/bn/bn_mul.c:497:1: Parameter `b->top`
  495.   #endif                          /* BN_RECURSION */
  496.   
  497. > int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
  498.   {
  499.       int ret = bn_mul_fixed_top(r, a, b, ctx);

crypto/bn/bn_mul.c:499:15: Call
  497.   int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
  498.   {
  499.       int ret = bn_mul_fixed_top(r, a, b, ctx);
                       ^
  500.   
  501.       bn_correct_top(r);

crypto/bn/bn_mul.c:507:1: Parameter `b->top`
    505.   }
    506.   
    507. > int bn_mul_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
    508.   {
    509.       int ret = 0;

crypto/bn/bn_mul.c:525:5: Assignment
    523.   
    524.       al = a->top;
    525.       bl = b->top;
               ^
    526.   
    527.       if ((al == 0) || (bl == 0)) {

crypto/bn/bn_mul.c:574:21: Call
    572.               }
    573.               if (i == -1) {
    574.                   j = BN_num_bits_word((BN_ULONG)bl);
                               ^
    575.               }
    576.               j = 1 << (j - 1);

crypto/bn/bn_lib.c:90:1: <RHS trace>
88.   }
89.   
90. > int BN_num_bits_word(BN_ULONG l)
91.   {
92.       BN_ULONG x, mask;

crypto/bn/bn_lib.c:90:1: Parameter `l`
      88.   }
      89.   
      90. > int BN_num_bits_word(BN_ULONG l)
      91.   {
      92.       BN_ULONG x, mask;

crypto/bn/bn_lib.c:96:5: Assignment
      94.   
      95.   #if BN_BITS2 > 32
      96.       x = l >> 32;
                ^
      97.       mask = (0 - x) & BN_MASK2;
      98.       mask = (0 - (mask >> (BN_BITS2 - 1)));

crypto/bn/bn_lib.c:97:5: Binary operation: (0 - [0, max(1, key->q->top)]):unsigned64 by call to `BN_mul` 
      95.   #if BN_BITS2 > 32
      96.       x = l >> 32;
      97.       mask = (0 - x) & BN_MASK2;
                 ^
      98.       mask = (0 - (mask >> (BN_BITS2 - 1)));
      99.       bits += 32 & mask;
