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


crypto/rsa/rsa_chk.c:19:1: Parameter `key->p->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:65:9: Call
63.   
64.       /* p prime? */
65.       if (BN_is_prime_ex(key->p, BN_prime_checks, NULL, cb) != 1) {
              ^
66.           ret = 0;
67.           RSAerr(RSA_F_RSA_CHECK_KEY_EX, RSA_R_P_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:863:1: Parameter `a->top`
      861.   }
      862.   
      863. > int BN_is_word(const BIGNUM *a, const BN_ULONG w)
      864.   {
      865.       return BN_abs_is_word(a, w) && (!w || !a->neg);

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

crypto/bn/bn_lib.c:848:1: Parameter `a->top`
        846.   }
        847.   
        848. > int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
        849.   {
        850.       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 `a->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 = 0;

crypto/bn/bn_mul.c:514:5: Assignment
  512.       bn_check_top(r);
  513.   
  514.       al = a->top;
             ^
  515.       bl = b->top;
  516.   

crypto/bn/bn_mul.c:561:21: Call
  559.                */
  560.               if (i >= 0) {
  561.                   j = BN_num_bits_word((BN_ULONG)al);
                             ^
  562.               }
  563.               if (i == -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->p->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;
