apps/rsa.c:321: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `RSA_check_key`.
Showing all 18 steps of the trace


apps/rsa.c:316:9: Call
314.           RSA_get0_key(rsa, &n, NULL, NULL);
315.           BIO_printf(out, "Modulus=");
316.           BN_print(out, n);
               ^
317.           BIO_printf(out, "\n");
318.       }

crypto/bn/bn_print.c:348:1: Parameter `a->top`
  346.   # endif
  347.   
  348. > int BN_print(BIO *bp, const BIGNUM *a)
  349.   {
  350.       int i, j, v, z = 0;

apps/rsa.c:321:17: Call
319.   
320.       if (check) {
321.           int r = RSA_check_key(rsa);
                       ^
322.   
323.           if (r == 1)

crypto/rsa/rsa_chk.c:54:1: Parameter `key->d->top`
  52.   #include "rsa_locl.h"
  53.   
  54. > int RSA_check_key(const RSA *key)
  55.   {
  56.       return RSA_check_key_ex(key, NULL);

crypto/rsa/rsa_chk.c:56:12: Call
  54.   int RSA_check_key(const RSA *key)
  55.   {
  56.       return RSA_check_key_ex(key, NULL);
                   ^
  57.   }
  58.   

crypto/rsa/rsa_chk.c:59:1: Parameter `key->d->top`
    57.   }
    58.   
    59. > int RSA_check_key_ex(const RSA *key, BN_GENCB *cb)
    60.   {
    61.       BIGNUM *i, *j, *k, *l, *m;

crypto/rsa/rsa_chk.c:163:13: Call
    161.           }
    162.   
    163.           r = BN_mod(j, key->d, i, ctx);
                       ^
    164.           if (!r) {
    165.               ret = -1;

crypto/bn/bn_div.c:188:1: Parameter `num->top`
      186.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
      187.    */
      188. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
      189.              BN_CTX *ctx)
      190.   {

crypto/bn/bn_div.c:258:11: Call
      256.       sdiv->neg = 0;
      257.       norm_shift += BN_BITS2;
      258.       if (!(BN_lshift(snum, num, norm_shift)))
                       ^
      259.           goto err;
      260.       snum->neg = 0;

crypto/bn/bn_shift.c:129:1: <Offset trace>
127.   }
128.   
129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
130.   {
131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:129:1: Parameter `n`
        127.   }
        128.   
        129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        130.   {
        131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:144:5: Assignment
        142.   
        143.       r->neg = a->neg;
        144.       nw = n / BN_BITS2;
                   ^
        145.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
        146.           return (0);

crypto/bn/bn_shift.c:129:1: <Length trace>
127.   }
128.   
129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
130.   {
131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:129:1: Parameter `*r->d`
        127.   }
        128.   
        129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        130.   {
        131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:145:9: Call
        143.       r->neg = a->neg;
        144.       nw = n / BN_BITS2;
        145.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                       ^
        146.           return (0);
        147.       lb = n % BN_BITS2;

crypto/bn/bn_lib.c:1067:1: Parameter `*a->d`
          1065.   }
          1066.   
          1067. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          1068.   {
          1069.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:150:5: Assignment
        148.       rb = BN_BITS2 - lb;
        149.       f = a->d;
        150.       t = r->d;
                   ^
        151.       t[a->top + nw] = 0;
        152.       if (lb == 0)

crypto/bn/bn_shift.c:158:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `RSA_check_key` 
        156.           for (i = a->top - 1; i >= 0; i--) {
        157.               l = f[i];
        158.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                           ^
        159.               t[nw + i] = (l << lb) & BN_MASK2;
        160.           }
