test/drbgtest.c:262: error: INTEGER_OVERFLOW_L2
  ([1, max(2147483632, `drbg->max_entropy`)] - [min(16, `drbg->ctr.keylen`), max(32, `drbg->ctr.keylen`)]):unsigned64 by call to `RAND_DRBG_instantiate`.
Showing all 17 steps of the trace


test/drbgtest.c:258:1: Parameter `drbg->max_entropy`
256.    * Initialise and instantiate DRBG based on selftest data
257.    */
258. > static int instantiate(RAND_DRBG *drbg, DRBG_SELFTEST_DATA *td,
259.                          TEST_CTX *t)
260.   {

test/drbgtest.c:261:10: Call
259.                          TEST_CTX *t)
260.   {
261.       if (!TEST_true(init(drbg, td, t))
                ^
262.               || !TEST_true(RAND_DRBG_instantiate(drbg, td->pers, td->perslen)))
263.           return 0;

test/drbgtest.c:239:1: Parameter `drbg->max_entropy`
  237.    * Initialise a DRBG based on selftest data
  238.    */
  239. > static int init(RAND_DRBG *drbg, DRBG_SELFTEST_DATA *td, TEST_CTX *t)
  240.   {
  241.       if (!TEST_true(RAND_DRBG_set(drbg, td->nid, td->flags))

test/drbgtest.c:241:10: Call
  239.   static int init(RAND_DRBG *drbg, DRBG_SELFTEST_DATA *td, TEST_CTX *t)
  240.   {
  241.       if (!TEST_true(RAND_DRBG_set(drbg, td->nid, td->flags))
                  ^
  242.               || !TEST_true(RAND_DRBG_set_callbacks(drbg, kat_entropy, NULL,
  243.                                                     kat_nonce, NULL)))

crypto/rand/drbg_lib.c:33:1: Parameter `drbg->max_entropy`
    31.    * failure.
    32.    */
    33. > int RAND_DRBG_set(RAND_DRBG *drbg, int nid, unsigned int flags)
    34.   {
    35.       int ret = 1;

test/drbgtest.c:262:17: Call
260.   {
261.       if (!TEST_true(init(drbg, td, t))
262.               || !TEST_true(RAND_DRBG_instantiate(drbg, td->pers, td->perslen)))
                       ^
263.           return 0;
264.       return 1;

crypto/rand/drbg_lib.c:129:1: Parameter `drbg->max_entropy`
  127.    * |perslen| as prediction-resistance input.
  128.    */
  129. > int RAND_DRBG_instantiate(RAND_DRBG *drbg,
  130.                             const unsigned char *pers, size_t perslen)
  131.   {

crypto/rand/drbg_lib.c:165:10: Call
  163.       }
  164.   
  165.       if (!ctr_instantiate(drbg, entropy, entlen,
                  ^
  166.                            nonce, noncelen, pers, perslen)) {
  167.           RANDerr(RAND_F_RAND_DRBG_INSTANTIATE, RAND_R_ERROR_INSTANTIATING_DRBG);

crypto/rand/drbg_rand.c:239:1: Parameter `entlen`
    237.   }
    238.   
    239. > int ctr_instantiate(RAND_DRBG *drbg,
    240.                       const unsigned char *ent, size_t entlen,
    241.                       const unsigned char *nonce, size_t noncelen,

crypto/rand/drbg_rand.c:249:5: Call
    247.       memset(ctr->V, 0, sizeof(ctr->V));
    248.       AES_set_encrypt_key(ctr->K, drbg->strength, &ctr->ks);
    249.       ctr_update(drbg, ent, entlen, pers, perslen, nonce, noncelen);
               ^
    250.       return 1;
    251.   }

crypto/rand/drbg_rand.c:199:1: Parameter `in1len`
      197.    * so we handle both cases in this function instead.
      198.    */
      199. > static void ctr_update(RAND_DRBG *drbg,
      200.                          const unsigned char *in1, size_t in1len,
      201.                          const unsigned char *in2, size_t in2len,

crypto/rand/drbg_rand.c:232:9: Call
      230.               ctr_XOR(ctr, ctr->KX, drbg->seedlen);
      231.       } else {
      232.           ctr_XOR(ctr, in1, in1len);
                     ^
      233.           ctr_XOR(ctr, in2, in2len);
      234.       }

crypto/rand/drbg_rand.c:39:1: <LHS trace>
37.   }
38.   
39. > static void ctr_XOR(RAND_DRBG_CTR *ctr, const unsigned char *in, size_t inlen)
40.   {
41.       size_t i, n;

crypto/rand/drbg_rand.c:39:1: Parameter `inlen`
        37.   }
        38.   
        39. > static void ctr_XOR(RAND_DRBG_CTR *ctr, const unsigned char *in, size_t inlen)
        40.   {
        41.       size_t i, n;

crypto/rand/drbg_rand.c:39:1: <RHS trace>
37.   }
38.   
39. > static void ctr_XOR(RAND_DRBG_CTR *ctr, const unsigned char *in, size_t inlen)
40.   {
41.       size_t i, n;

crypto/rand/drbg_rand.c:39:1: Parameter `inlen`
        37.   }
        38.   
        39. > static void ctr_XOR(RAND_DRBG_CTR *ctr, const unsigned char *in, size_t inlen)
        40.   {
        41.       size_t i, n;

crypto/rand/drbg_rand.c:56:5: Binary operation: ([1, max(2147483632, drbg->max_entropy)] - [min(16, drbg->ctr.keylen), max(32, drbg->ctr.keylen)]):unsigned64 by call to `RAND_DRBG_instantiate` 
        54.           return;
        55.   
        56.       n = inlen - ctr->keylen;
                  ^
        57.       if (n > 16) {
        58.           /* Should never happen */
