crypto/rsa/rsa_x931g.c:61: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, +oo] by call to `BN_X931_derive_prime_ex`.
Showing all 24 steps of the trace


crypto/rsa/rsa_x931g.c:44:18: Call
42.           goto err;
43.       if (!rsa->e) {
44.           rsa->e = BN_dup(e);
                       ^
45.           if (!rsa->e)
46.               goto err;

crypto/bn/bn_lib.c:272:10: Call
  270.       if (t == NULL)
  271.           return NULL;
  272.       if (!BN_copy(t, a)) {
                  ^
  273.           BN_free(t);
  274.           return NULL;

crypto/bn/bn_lib.c:280:1: Parameter `*a->d`
    278.   }
    279.   
    280. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    281.   {
    282.       bn_check_top(b);

crypto/rsa/rsa_x931g.c:61:14: Call
59.               goto err;
60.   
61.           if (!BN_X931_derive_prime_ex(rsa->p, p1, p2,
                   ^
62.                                        Xp, Xp1, Xp2, e, ctx, cb))
63.               goto err;

crypto/bn/bn_x931p.c:94:10: Call
  92.           goto err;
  93.   
  94.       if (!BN_mul(p, p, p2, ctx))
                 ^
  95.           goto err;
  96.   

crypto/bn/bn_mul.c:497:1: Parameter `r->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_x931p.c:103:10: Call
  101.           goto err;
  102.   
  103.       if (!BN_sub(p, p, t))
                  ^
  104.           goto err;
  105.   

crypto/bn/bn_add.c:45:1: Parameter `a->top`
    43.   
    44.   /* signed sub of b from a. */
    45. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    46.   {
    47.       int ret, r_neg, cmp_res;

crypto/bn/bn_x931p.c:111:10: Call
  109.       /* p now equals Rp */
  110.   
  111.       if (!BN_mod_sub(p, p, Xp, p1p2, ctx))
                  ^
  112.           goto err;
  113.   

crypto/bn/bn_mod.c:50:1: Parameter `*r->d`
    48.   }
    49.   
    50. > int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
    51.                  BN_CTX *ctx)
    52.   {

crypto/bn/bn_mod.c:53:10: Call
    51.                  BN_CTX *ctx)
    52.   {
    53.       if (!BN_sub(r, a, b))
                   ^
    54.           return 0;
    55.       return BN_nnmod(r, r, m, ctx);

crypto/bn/bn_add.c:45:1: Parameter `*r->d`
      43.   
      44.   /* signed sub of b from a. */
      45. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
      46.   {
      47.       int ret, r_neg, cmp_res;

crypto/bn/bn_add.c:54:15: Call
      52.       if (a->neg != b->neg) {
      53.           r_neg = a->neg;
      54.           ret = BN_uadd(r, a, b);
                          ^
      55.       } else {
      56.           cmp_res = BN_ucmp(a, b);

crypto/bn/bn_add.c:76:1: Parameter `*r->d`
        74.   
        75.   /* unsigned add of b to a, r can be equal to a or b. */
        76. > int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
        77.   {
        78.       int max, min, dif;

crypto/bn/bn_add.c:96:9: Call
        94.       dif = max - min;
        95.   
        96.       if (bn_wexpand(r, max + 1) == NULL)
                      ^
        97.           return 0;
        98.   

crypto/bn/bn_lib.c:942:1: Parameter `*a->d`
          940.   }
          941.   
          942. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          943.   {
          944.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:944:37: Call
          942.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
          943.   {
          944.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                     ^
          945.   }
          946.   

crypto/bn/bn_lib.c:244:1: Parameter `*b->d`
            242.    */
            243.   
            244. > BIGNUM *bn_expand2(BIGNUM *b, int words)
            245.   {
            246.       if (words > b->dmax) {

crypto/bn/bn_lib.c:247:23: Call
            245.   {
            246.       if (words > b->dmax) {
            247.           BN_ULONG *a = bn_expand_internal(b, words);
                                         ^
            248.           if (!a)
            249.               return NULL;

crypto/bn/bn_lib.c:208:1: <Offset trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `b->top`
              206.   /* This is used by bn_expand2() */
              207.   /* The caller MUST check that words > b->dmax before calling this */
              208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
              209.   {
              210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: <Length trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `*b->d`
              206.   /* This is used by bn_expand2() */
              207.   /* The caller MUST check that words > b->dmax before calling this */
              208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
              209.   {
              210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:231:9: Array access: Offset added: [8, +oo] Size: [0, +oo] by call to `BN_X931_derive_prime_ex` 
              229.       assert(b->top <= words);
              230.       if (b->top > 0)
              231.           memcpy(a, b->d, sizeof(*a) * b->top);
                             ^
              232.   
              233.       return a;
