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


test/drbgtest.c:258:1: Parameter `dctx->max_entropy`
256.    * Initialise and instantiate DRBG based on selftest data
257.    */
258. > static int instantiate(DRBG_CTX *dctx, 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(dctx, td, t))
                ^
262.               || !TEST_true(RAND_DRBG_instantiate(dctx, td->pers, td->perslen)))
263.           return 0;

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

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

crypto/rand/drbg_lib.c:58:1: Parameter `dctx->max_entropy`
    56.    * failure.
    57.    */
    58. > int RAND_DRBG_set(DRBG_CTX *dctx, int nid, unsigned int flags)
    59.   {
    60.       int ret = 1;

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

crypto/rand/drbg_lib.c:132:1: Parameter `dctx->max_entropy`
  130.    * |perslen| as prediction-resistance input.
  131.    */
  132. > int RAND_DRBG_instantiate(DRBG_CTX *dctx,
  133.                             const unsigned char *pers, size_t perslen)
  134.   {

crypto/rand/drbg_lib.c:168:10: Call
  166.       }
  167.   
  168.       if (!ctr_instantiate(dctx, entropy, entlen,
                  ^
  169.                            nonce, noncelen, pers, perslen)) {
  170.           r = RAND_R_ERROR_INSTANTIATING_DRBG;

crypto/rand/drbg_rand.c:262:1: Parameter `entlen`
    260.   }
    261.   
    262. > int ctr_instantiate(DRBG_CTX *dctx,
    263.                       const unsigned char *ent, size_t entlen,
    264.                       const unsigned char *nonce, size_t noncelen,

crypto/rand/drbg_rand.c:272:5: Call
    270.       memset(cctx->V, 0, sizeof(cctx->V));
    271.       AES_set_encrypt_key(cctx->K, dctx->strength, &cctx->ks);
    272.       ctr_update(dctx, ent, entlen, pers, perslen, nonce, noncelen);
               ^
    273.       return 1;
    274.   }

crypto/rand/drbg_rand.c:222:1: Parameter `in1len`
      220.    * handle both cases in this function instead.
      221.    */
      222. > static void ctr_update(DRBG_CTX *dctx,
      223.                          const unsigned char *in1, size_t in1len,
      224.                          const unsigned char *in2, size_t in2len,

crypto/rand/drbg_rand.c:255:9: Call
      253.               ctr_XOR(cctx, cctx->KX, dctx->seedlen);
      254.       } else {
      255.           ctr_XOR(cctx, in1, in1len);
                     ^
      256.           ctr_XOR(cctx, in2, in2len);
      257.       }

crypto/rand/drbg_rand.c:62:1: <LHS trace>
60.   }
61.   
62. > static void ctr_XOR(DRBG_CTR_CTX *cctx, const unsigned char *in, size_t inlen)
63.   {
64.       size_t i, n;

crypto/rand/drbg_rand.c:62:1: Parameter `inlen`
        60.   }
        61.   
        62. > static void ctr_XOR(DRBG_CTR_CTX *cctx, const unsigned char *in, size_t inlen)
        63.   {
        64.       size_t i, n;

crypto/rand/drbg_rand.c:62:1: <RHS trace>
60.   }
61.   
62. > static void ctr_XOR(DRBG_CTR_CTX *cctx, const unsigned char *in, size_t inlen)
63.   {
64.       size_t i, n;

crypto/rand/drbg_rand.c:62:1: Parameter `inlen`
        60.   }
        61.   
        62. > static void ctr_XOR(DRBG_CTR_CTX *cctx, const unsigned char *in, size_t inlen)
        63.   {
        64.       size_t i, n;

crypto/rand/drbg_rand.c:79:5: Binary operation: ([1, max(2147483632, dctx->max_entropy)] - [min(16, dctx->ctr.keylen), max(32, dctx->ctr.keylen)]):unsigned64 by call to `RAND_DRBG_instantiate` 
        77.           return;
        78.   
        79.       n = inlen - cctx->keylen;
                  ^
        80.       if (n > 16) {
        81.           /* Should never happen */
