crypto/bn/bn_rand.c:299: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_div`.
Showing all 18 steps of the trace


crypto/bn/bn_rand.c:231:1: Parameter `range->top`
229.    * used.
230.    */
231. > int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
232.                             const BIGNUM *priv, const unsigned char *message,
233.                             size_t message_len, BN_CTX *ctx)

crypto/bn/bn_rand.c:244:34: Call
242.       unsigned done, todo;
243.       /* We generate |range|+8 bytes of random output. */
244.       const unsigned num_k_bytes = BN_num_bytes(range) + 8;
                                        ^
245.       unsigned char private_bytes[96];
246.       unsigned char *k_bytes = NULL;

crypto/bn/bn_lib.c:140:9: Call
  138.       bn_check_top(a);
  139.   
  140.       if (BN_is_zero(a))
                 ^
  141.           return 0;
  142.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:866:1: Parameter `a->top`
    864.   }
    865.   
    866. > int BN_is_zero(const BIGNUM *a)
    867.   {
    868.       return a->top == 0;

crypto/bn/bn_rand.c:299:9: Call
297.       if (!BN_bin2bn(k_bytes, num_k_bytes, out))
298.           goto err;
299.       if (BN_mod(out, out, range, ctx) != 1)
               ^
300.           goto err;
301.       ret = 1;

crypto/bn/bn_div.c:209:1: Parameter `divisor->top`
  207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
  208.    */
  209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  210.              BN_CTX *ctx)
  211.   {

crypto/bn/bn_div.c:214:9: Call
  212.       int ret;
  213.   
  214.       if (BN_is_zero(divisor)) {
                 ^
  215.           BNerr(BN_F_BN_DIV, BN_R_DIV_BY_ZERO);
  216.           return 0;

crypto/bn/bn_lib.c:866:1: Parameter `a->top`
    864.   }
    865.   
    866. > int BN_is_zero(const BIGNUM *a)
    867.   {
    868.       return a->top == 0;

crypto/bn/bn_div.c:229:11: Call
  227.       }
  228.   
  229.       ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
                   ^
  230.   
  231.       if (ret) {

crypto/bn/bn_div.c:264:1: Parameter `divisor->top`
    262.    *       divisor's length is considered public;
    263.    */
    264. > int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
    265.                        const BIGNUM *divisor, BN_CTX *ctx)
    266.   {

crypto/bn/bn_div.c:289:10: Call
    287.   
    288.       /* First we normalise the numbers */
    289.       if (!BN_copy(sdiv, divisor))
                    ^
    290.           goto err;
    291.       norm_shift = bn_left_align(sdiv);

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

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

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

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

crypto/bn/bn_lib.c:287:9: Call
      285.       if (a == b)
      286.           return a;
      287.       if (bn_wexpand(a, b->top) == NULL)
                     ^
      288.           return NULL;
      289.   

crypto/bn/bn_lib.c:962:1: Parameter `*a->d`
        960.   }
        961.   
        962. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        963.   {
        964.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_div` 
      289.   
      290.       if (b->top > 0)
      291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                     ^
      292.   
      293.       a->neg = b->neg;
