crypto/rsa/rsa_crpt.c:99: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_sub`.
Showing all 17 steps of the trace


crypto/rsa/rsa_crpt.c:97:10: Call
95.           goto err;
96.   
97.       if (!BN_sub(r1, p, BN_value_one()))
                ^
98.           goto err;
99.       if (!BN_sub(r2, q, BN_value_one()))

crypto/bn/bn_add.c:59:19: Call
  57.           if (cmp_res > 0) {
  58.               r_neg = a->neg;
  59.               ret = BN_usub(r, a, b);
                          ^
  60.           } else if (cmp_res < 0) {
  61.               r_neg = !b->neg;

crypto/bn/bn_add.c:125:1: Parameter `r->top`
    123.   
    124.   /* unsigned subtraction of b from a, a must be larger than b. */
    125. > int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    126.   {
    127.       int max, min, dif;

crypto/rsa/rsa_crpt.c:99:10: Call
97.       if (!BN_sub(r1, p, BN_value_one()))
98.           goto err;
99.       if (!BN_sub(r2, q, BN_value_one()))
                ^
100.           goto err;
101.       if (!BN_mul(r0, r1, r2, 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:62:19: Call
  60.           } else if (cmp_res < 0) {
  61.               r_neg = !b->neg;
  62.               ret = BN_usub(r, b, a);
                          ^
  63.           } else {
  64.               r_neg = 0;

crypto/bn/bn_add.c:125:1: Parameter `*r->d`
    123.   
    124.   /* unsigned subtraction of b from a, a must be larger than b. */
    125. > int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    126.   {
    127.       int max, min, dif;

crypto/bn/bn_add.c:143:9: Call
    141.       }
    142.   
    143.       if (bn_wexpand(r, max) == NULL)
                   ^
    144.           return 0;
    145.   

crypto/bn/bn_lib.c:910:1: Parameter `*a->d`
      908.   }
      909.   
      910. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      911.   {
      912.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:912:37: Call
      910.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
      911.   {
      912.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                 ^
      913.   }
      914.   

crypto/bn/bn_lib.c:246:1: Parameter `*b->d`
        244.    */
        245.   
        246. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        247.   {
        248.       bn_check_top(b);

crypto/bn/bn_lib.c:251:23: Call
        249.   
        250.       if (words > b->dmax) {
        251.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        252.           if (!a)
        253.               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:233:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_sub` 
          231.       assert(b->top <= words);
          232.       if (b->top > 0)
          233.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          234.   
          235.       return a;
