test/bntest.c:592: error: MEMORY_LEAK
  memory dynamically allocated by call to `BN_MONT_CTX_new()` at line 402, column 17 is not reachable after line 592, column 5.
Showing all 140 steps of the trace


test/bntest.c:387:1: start of procedure test_modexp_mont5()
385.    * x86_64 cause a different code branch to be taken.
386.    */
387. > static int test_modexp_mont5(void)
388.   {
389.       BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL;

test/bntest.c:389:5: 
387.   static int test_modexp_mont5(void)
388.   {
389. >     BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL;
390.       BIGNUM *b = NULL, *n = NULL, *c = NULL;
391.       BN_MONT_CTX *mont = NULL;

test/bntest.c:390:5: 
388.   {
389.       BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL;
390. >     BIGNUM *b = NULL, *n = NULL, *c = NULL;
391.       BN_MONT_CTX *mont = NULL;
392.       int st = 0;

test/bntest.c:391:5: 
389.       BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL;
390.       BIGNUM *b = NULL, *n = NULL, *c = NULL;
391. >     BN_MONT_CTX *mont = NULL;
392.       int st = 0;
393.   

test/bntest.c:392:5: 
390.       BIGNUM *b = NULL, *n = NULL, *c = NULL;
391.       BN_MONT_CTX *mont = NULL;
392. >     int st = 0;
393.   
394.       if (!TEST_ptr(a = BN_new())

test/bntest.c:394:10: Skipping BN_new(): empty list of specs
392.       int st = 0;
393.   
394.       if (!TEST_ptr(a = BN_new())
                ^
395.               || !TEST_ptr(p = BN_new())
396.               || !TEST_ptr(m = BN_new())

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:394:10: Taking false branch
392.       int st = 0;
393.   
394.       if (!TEST_ptr(a = BN_new())
                ^
395.               || !TEST_ptr(p = BN_new())
396.               || !TEST_ptr(m = BN_new())

test/bntest.c:395:17: Skipping BN_new(): empty list of specs
393.   
394.       if (!TEST_ptr(a = BN_new())
395.               || !TEST_ptr(p = BN_new())
                       ^
396.               || !TEST_ptr(m = BN_new())
397.               || !TEST_ptr(d = BN_new())

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:395:17: Taking false branch
393.   
394.       if (!TEST_ptr(a = BN_new())
395.               || !TEST_ptr(p = BN_new())
                       ^
396.               || !TEST_ptr(m = BN_new())
397.               || !TEST_ptr(d = BN_new())

test/bntest.c:396:17: Skipping BN_new(): empty list of specs
394.       if (!TEST_ptr(a = BN_new())
395.               || !TEST_ptr(p = BN_new())
396.               || !TEST_ptr(m = BN_new())
                       ^
397.               || !TEST_ptr(d = BN_new())
398.               || !TEST_ptr(e = BN_new())

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:396:17: Taking false branch
394.       if (!TEST_ptr(a = BN_new())
395.               || !TEST_ptr(p = BN_new())
396.               || !TEST_ptr(m = BN_new())
                       ^
397.               || !TEST_ptr(d = BN_new())
398.               || !TEST_ptr(e = BN_new())

test/bntest.c:397:17: Skipping BN_new(): empty list of specs
395.               || !TEST_ptr(p = BN_new())
396.               || !TEST_ptr(m = BN_new())
397.               || !TEST_ptr(d = BN_new())
                       ^
398.               || !TEST_ptr(e = BN_new())
399.               || !TEST_ptr(b = BN_new())

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:397:17: Taking false branch
395.               || !TEST_ptr(p = BN_new())
396.               || !TEST_ptr(m = BN_new())
397.               || !TEST_ptr(d = BN_new())
                       ^
398.               || !TEST_ptr(e = BN_new())
399.               || !TEST_ptr(b = BN_new())

test/bntest.c:398:17: Skipping BN_new(): empty list of specs
396.               || !TEST_ptr(m = BN_new())
397.               || !TEST_ptr(d = BN_new())
398.               || !TEST_ptr(e = BN_new())
                       ^
399.               || !TEST_ptr(b = BN_new())
400.               || !TEST_ptr(n = BN_new())

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:398:17: Taking false branch
396.               || !TEST_ptr(m = BN_new())
397.               || !TEST_ptr(d = BN_new())
398.               || !TEST_ptr(e = BN_new())
                       ^
399.               || !TEST_ptr(b = BN_new())
400.               || !TEST_ptr(n = BN_new())

test/bntest.c:399:17: Skipping BN_new(): empty list of specs
397.               || !TEST_ptr(d = BN_new())
398.               || !TEST_ptr(e = BN_new())
399.               || !TEST_ptr(b = BN_new())
                       ^
400.               || !TEST_ptr(n = BN_new())
401.               || !TEST_ptr(c = BN_new())

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:399:17: Taking false branch
397.               || !TEST_ptr(d = BN_new())
398.               || !TEST_ptr(e = BN_new())
399.               || !TEST_ptr(b = BN_new())
                       ^
400.               || !TEST_ptr(n = BN_new())
401.               || !TEST_ptr(c = BN_new())

test/bntest.c:400:17: Skipping BN_new(): empty list of specs
398.               || !TEST_ptr(e = BN_new())
399.               || !TEST_ptr(b = BN_new())
400.               || !TEST_ptr(n = BN_new())
                       ^
401.               || !TEST_ptr(c = BN_new())
402.               || !TEST_ptr(mont = BN_MONT_CTX_new()))

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:400:17: Taking false branch
398.               || !TEST_ptr(e = BN_new())
399.               || !TEST_ptr(b = BN_new())
400.               || !TEST_ptr(n = BN_new())
                       ^
401.               || !TEST_ptr(c = BN_new())
402.               || !TEST_ptr(mont = BN_MONT_CTX_new()))

test/bntest.c:401:17: Skipping BN_new(): empty list of specs
399.               || !TEST_ptr(b = BN_new())
400.               || !TEST_ptr(n = BN_new())
401.               || !TEST_ptr(c = BN_new())
                       ^
402.               || !TEST_ptr(mont = BN_MONT_CTX_new()))
403.           goto err;

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:401:17: Taking false branch
399.               || !TEST_ptr(b = BN_new())
400.               || !TEST_ptr(n = BN_new())
401.               || !TEST_ptr(c = BN_new())
                       ^
402.               || !TEST_ptr(mont = BN_MONT_CTX_new()))
403.           goto err;

test/bntest.c:402:17: 
400.               || !TEST_ptr(n = BN_new())
401.               || !TEST_ptr(c = BN_new())
402. >             || !TEST_ptr(mont = BN_MONT_CTX_new()))
403.           goto err;
404.   

crypto/bn/bn_mont.c:228:1: start of procedure BN_MONT_CTX_new()
  226.   }
  227.   
  228. > BN_MONT_CTX *BN_MONT_CTX_new(void)
  229.   {
  230.       BN_MONT_CTX *ret;

crypto/bn/bn_mont.c:232:9: 
  230.       BN_MONT_CTX *ret;
  231.   
  232. >     if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) {
  233.           BNerr(BN_F_BN_MONT_CTX_NEW, ERR_R_MALLOC_FAILURE);
  234.           return NULL;

crypto/mem.c:192:1: start of procedure CRYPTO_malloc()
    190.   #endif
    191.   
    192. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194.       void *ret = NULL;

crypto/mem.c:194:5: 
    192.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194. >     void *ret = NULL;
    195.   
    196.       INCREMENT(malloc_count);

crypto/mem.c:197:9: Taking false branch
    195.   
    196.       INCREMENT(malloc_count);
    197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    198.           return malloc_impl(num, file, line);
    199.   

crypto/mem.c:200:9: Taking false branch
    198.           return malloc_impl(num, file, line);
    199.   
    200.       if (num == 0)
                   ^
    201.           return NULL;
    202.   

crypto/mem.c:204:9: Taking true branch
    202.   
    203.       FAILTEST();
    204.       if (allow_customize) {
                   ^
    205.           /*
    206.            * Disallow customization after the first allocation. We only set this

crypto/mem.c:210:9: 
    208.            * allocation.
    209.            */
    210. >         allow_customize = 0;
    211.       }
    212.   #if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)

crypto/mem.c:221:5: 
    219.       }
    220.   #else
    221. >     (void)(file); (void)(line);
    222.       ret = malloc(num);
    223.   #endif

crypto/mem.c:221:19: 
    219.       }
    220.   #else
    221. >     (void)(file); (void)(line);
    222.       ret = malloc(num);
    223.   #endif

crypto/mem.c:222:5: 
    220.   #else
    221.       (void)(file); (void)(line);
    222. >     ret = malloc(num);
    223.   #endif
    224.   

crypto/mem.c:225:5: 
    223.   #endif
    224.   
    225. >     return ret;
    226.   }
    227.   

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
    224.   
    225.       return ret;
    226. > }
    227.   
    228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/bn/bn_mont.c:232:9: Taking false branch
  230.       BN_MONT_CTX *ret;
  231.   
  232.       if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) {
                 ^
  233.           BNerr(BN_F_BN_MONT_CTX_NEW, ERR_R_MALLOC_FAILURE);
  234.           return NULL;

crypto/bn/bn_mont.c:237:5: 
  235.       }
  236.   
  237. >     BN_MONT_CTX_init(ret);
  238.       ret->flags = BN_FLG_MALLOCED;
  239.       return ret;

crypto/bn/bn_mont.c:242:1: start of procedure BN_MONT_CTX_init()
    240.   }
    241.   
    242. > void BN_MONT_CTX_init(BN_MONT_CTX *ctx)
    243.   {
    244.       ctx->ri = 0;

crypto/bn/bn_mont.c:244:5: 
    242.   void BN_MONT_CTX_init(BN_MONT_CTX *ctx)
    243.   {
    244. >     ctx->ri = 0;
    245.       bn_init(&ctx->RR);
    246.       bn_init(&ctx->N);

crypto/bn/bn_mont.c:245:5: Skipping bn_init(): empty list of specs
    243.   {
    244.       ctx->ri = 0;
    245.       bn_init(&ctx->RR);
               ^
    246.       bn_init(&ctx->N);
    247.       bn_init(&ctx->Ni);

crypto/bn/bn_mont.c:246:5: Skipping bn_init(): empty list of specs
    244.       ctx->ri = 0;
    245.       bn_init(&ctx->RR);
    246.       bn_init(&ctx->N);
               ^
    247.       bn_init(&ctx->Ni);
    248.       ctx->n0[0] = ctx->n0[1] = 0;

crypto/bn/bn_mont.c:247:5: Skipping bn_init(): empty list of specs
    245.       bn_init(&ctx->RR);
    246.       bn_init(&ctx->N);
    247.       bn_init(&ctx->Ni);
               ^
    248.       ctx->n0[0] = ctx->n0[1] = 0;
    249.       ctx->flags = 0;

crypto/bn/bn_mont.c:248:5: 
    246.       bn_init(&ctx->N);
    247.       bn_init(&ctx->Ni);
    248. >     ctx->n0[0] = ctx->n0[1] = 0;
    249.       ctx->flags = 0;
    250.   }

crypto/bn/bn_mont.c:249:5: 
    247.       bn_init(&ctx->Ni);
    248.       ctx->n0[0] = ctx->n0[1] = 0;
    249. >     ctx->flags = 0;
    250.   }
    251.   

crypto/bn/bn_mont.c:250:1: return from a call to BN_MONT_CTX_init
    248.       ctx->n0[0] = ctx->n0[1] = 0;
    249.       ctx->flags = 0;
    250. > }
    251.   
    252.   void BN_MONT_CTX_free(BN_MONT_CTX *mont)

crypto/bn/bn_mont.c:238:5: 
  236.   
  237.       BN_MONT_CTX_init(ret);
  238. >     ret->flags = BN_FLG_MALLOCED;
  239.       return ret;
  240.   }

crypto/bn/bn_mont.c:239:5: 
  237.       BN_MONT_CTX_init(ret);
  238.       ret->flags = BN_FLG_MALLOCED;
  239. >     return ret;
  240.   }
  241.   

crypto/bn/bn_mont.c:240:1: return from a call to BN_MONT_CTX_new
  238.       ret->flags = BN_FLG_MALLOCED;
  239.       return ret;
  240. > }
  241.   
  242.   void BN_MONT_CTX_init(BN_MONT_CTX *ctx)

test/testutil/tests.c:252:1: start of procedure test_ptr()
  250.   }
  251.   
  252. > int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)

test/testutil/tests.c:254:9: Taking true branch
  252.   int test_ptr(const char *file, int line, const char *s, const void *p)
  253.   {
  254.       if (p != NULL)
                 ^
  255.           return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:255:9: 
  253.   {
  254.       if (p != NULL)
  255. >         return 1;
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;

test/testutil/tests.c:258:1: return from a call to test_ptr
  256.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  257.       return 0;
  258. > }
  259.   
  260.   int test_true(const char *file, int line, const char *s, int b)

test/bntest.c:402:17: Taking false branch
400.               || !TEST_ptr(n = BN_new())
401.               || !TEST_ptr(c = BN_new())
402.               || !TEST_ptr(mont = BN_MONT_CTX_new()))
                       ^
403.           goto err;
404.   

test/bntest.c:406:11: 
404.   
405.       /* must be odd for montgomery */
406. >     if (!(TEST_true(BN_bntest_rand(m, 1024, 0, 1))
407.               /* Zero exponent */
408.               && TEST_true(BN_bntest_rand(a, 1024, 0, 0))))

crypto/bn/bn_rand.c:119:1: start of procedure BN_bntest_rand()
  117.   }
  118.   
  119. > int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
  120.   {
  121.       return bnrand(TESTING, rnd, bits, top, bottom);

crypto/bn/bn_rand.c:121:5: 
  119.   int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
  120.   {
  121. >     return bnrand(TESTING, rnd, bits, top, bottom);
  122.   }
  123.   

crypto/bn/bn_rand.c:23:1: start of procedure bnrand()
    21.   } BNRAND_FLAG;
    22.   
    23. > static int bnrand(BNRAND_FLAG flag, BIGNUM *rnd, int bits, int top, int bottom)
    24.   {
    25.       unsigned char *buf = NULL;

crypto/bn/bn_rand.c:25:5: 
    23.   static int bnrand(BNRAND_FLAG flag, BIGNUM *rnd, int bits, int top, int bottom)
    24.   {
    25. >     unsigned char *buf = NULL;
    26.       int b, ret = 0, bit, bytes, mask;
    27.   

crypto/bn/bn_rand.c:26:5: 
    24.   {
    25.       unsigned char *buf = NULL;
    26. >     int b, ret = 0, bit, bytes, mask;
    27.   
    28.       if (bits == 0) {

crypto/bn/bn_rand.c:28:9: Taking false branch
    26.       int b, ret = 0, bit, bytes, mask;
    27.   
    28.       if (bits == 0) {
                  ^
    29.           if (top != BN_RAND_TOP_ANY || bottom != BN_RAND_BOTTOM_ANY)
    30.               goto toosmall;

crypto/bn/bn_rand.c:34:9: Taking false branch
    32.           return 1;
    33.       }
    34.       if (bits < 0 || (bits == 1 && top > 0))
                  ^
    35.           goto toosmall;
    36.   

crypto/bn/bn_rand.c:34:22: Taking false branch
    32.           return 1;
    33.       }
    34.       if (bits < 0 || (bits == 1 && top > 0))
                               ^
    35.           goto toosmall;
    36.   

crypto/bn/bn_rand.c:37:5: 
    35.           goto toosmall;
    36.   
    37. >     bytes = (bits + 7) / 8;
    38.       bit = (bits - 1) % 8;
    39.       mask = 0xff << (bit + 1);

crypto/bn/bn_rand.c:38:5: 
    36.   
    37.       bytes = (bits + 7) / 8;
    38. >     bit = (bits - 1) % 8;
    39.       mask = 0xff << (bit + 1);
    40.   

crypto/bn/bn_rand.c:39:5: 
    37.       bytes = (bits + 7) / 8;
    38.       bit = (bits - 1) % 8;
    39. >     mask = 0xff << (bit + 1);
    40.   
    41.       buf = OPENSSL_malloc(bytes);

crypto/bn/bn_rand.c:41:5: 
    39.       mask = 0xff << (bit + 1);
    40.   
    41. >     buf = OPENSSL_malloc(bytes);
    42.       if (buf == NULL) {
    43.           BNerr(BN_F_BNRAND, ERR_R_MALLOC_FAILURE);

crypto/mem.c:192:1: start of procedure CRYPTO_malloc()
      190.   #endif
      191.   
      192. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      193.   {
      194.       void *ret = NULL;

crypto/mem.c:194:5: 
      192.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      193.   {
      194. >     void *ret = NULL;
      195.   
      196.       INCREMENT(malloc_count);

crypto/mem.c:197:9: Taking true branch
      195.   
      196.       INCREMENT(malloc_count);
      197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                     ^
      198.           return malloc_impl(num, file, line);
      199.   

crypto/mem.c:197:32: Taking true branch
      195.   
      196.       INCREMENT(malloc_count);
      197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                            ^
      198.           return malloc_impl(num, file, line);
      199.   

crypto/mem.c:198:9: Skipping __function_pointer__(): unresolved function pointer
      196.       INCREMENT(malloc_count);
      197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
      198.           return malloc_impl(num, file, line);
                     ^
      199.   
      200.       if (num == 0)

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
      224.   
      225.       return ret;
      226. > }
      227.   
      228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/bn/bn_rand.c:42:9: Taking false branch
    40.   
    41.       buf = OPENSSL_malloc(bytes);
    42.       if (buf == NULL) {
                  ^
    43.           BNerr(BN_F_BNRAND, ERR_R_MALLOC_FAILURE);
    44.           goto err;

crypto/bn/bn_rand.c:53:5: 
    51.        */
    52.   #if defined(FIPS_MODE)
    53. >     BNerr(BN_F_BNRAND, ERR_R_INTERNAL_ERROR);
    54.       goto err;
    55.   #else

providers/fips/fipsprov.c:246:1: start of procedure ERR_put_error()
      244.   }
      245.   
      246. > void ERR_put_error(int lib, int func, int reason, const char *file, int line)
      247.   {
      248.       /*

providers/fips/fipsprov.c:254:5: Skipping __function_pointer__(): unresolved function pointer
      252.        * so we'll need to come up with something else for them.
      253.        */
      254.       c_put_error(lib, func, reason, file, line);
                 ^
      255.   }
      256.   

providers/fips/fipsprov.c:255:1: return from a call to ERR_put_error
      253.        */
      254.       c_put_error(lib, func, reason, file, line);
      255. > }
      256.   
      257.   void ERR_add_error_data(int num, ...)

crypto/bn/bn_rand.c:104:2: 
    102.           goto err;
    103.       ret = 1;
    104. >  err:
    105.       OPENSSL_clear_free(buf, bytes);
    106.       bn_check_top(rnd);

crypto/bn/bn_rand.c:105:5: 
    103.       ret = 1;
    104.    err:
    105. >     OPENSSL_clear_free(buf, bytes);
    106.       bn_check_top(rnd);
    107.       return ret;

crypto/mem.c:316:1: start of procedure CRYPTO_clear_free()
      314.   }
      315.   
      316. > void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
      317.   {
      318.       if (str == NULL)

crypto/mem.c:318:9: Taking false branch
      316.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
      317.   {
      318.       if (str == NULL)
                     ^
      319.           return;
      320.       if (num)

crypto/mem.c:320:9: Taking false branch
      318.       if (str == NULL)
      319.           return;
      320.       if (num)
                     ^
      321.           OPENSSL_cleanse(str, num);
      322.       CRYPTO_free(str, file, line);

crypto/mem.c:322:5: 
      320.       if (num)
      321.           OPENSSL_cleanse(str, num);
      322. >     CRYPTO_free(str, file, line);
      323.   }

crypto/mem.c:295:1: start of procedure CRYPTO_free()
        293.   }
        294.   
        295. > void CRYPTO_free(void *str, const char *file, int line)
        296.   {
        297.       INCREMENT(free_count);

crypto/mem.c:298:9: Taking false branch
        296.   {
        297.       INCREMENT(free_count);
        298.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                       ^
        299.           free_impl(str, file, line);
        300.           return;

crypto/mem.c:312:5: 
        310.       }
        311.   #else
        312. >     free(str);
        313.   #endif
        314.   }

crypto/mem.c:314:1: return from a call to CRYPTO_free
        312.       free(str);
        313.   #endif
        314. > }
        315.   
        316.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/mem.c:323:1: return from a call to CRYPTO_clear_free
      321.           OPENSSL_cleanse(str, num);
      322.       CRYPTO_free(str, file, line);
      323. > }

crypto/bn/bn_rand.c:107:5: 
    105.       OPENSSL_clear_free(buf, bytes);
    106.       bn_check_top(rnd);
    107. >     return ret;
    108.   
    109.   toosmall:

crypto/bn/bn_rand.c:112:1: return from a call to bnrand
    110.       BNerr(BN_F_BNRAND, BN_R_BITS_TOO_SMALL);
    111.       return 0;
    112. > }
    113.   
    114.   int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)

crypto/bn/bn_rand.c:122:1: return from a call to BN_bntest_rand
  120.   {
  121.       return bnrand(TESTING, rnd, bits, top, bottom);
  122. > }
  123.   
  124.   int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom)

test/bntest.c:406:11: Condition is false
404.   
405.       /* must be odd for montgomery */
406.       if (!(TEST_true(BN_bntest_rand(m, 1024, 0, 1))
                 ^
407.               /* Zero exponent */
408.               && TEST_true(BN_bntest_rand(a, 1024, 0, 0))))

test/testutil/tests.c:260:1: start of procedure test_true()
  258.   }
  259.   
  260. > int test_true(const char *file, int line, const char *s, int b)
  261.   {
  262.       if (b)

test/testutil/tests.c:262:9: Taking false branch
  260.   int test_true(const char *file, int line, const char *s, int b)
  261.   {
  262.       if (b)
                 ^
  263.           return 1;
  264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");

test/testutil/tests.c:264:5: Skipping test_fail_message(): empty list of specs
  262.       if (b)
  263.           return 1;
  264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
             ^
  265.       return 0;
  266.   }

test/testutil/tests.c:265:5: 
  263.           return 1;
  264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
  265. >     return 0;
  266.   }
  267.   

test/testutil/tests.c:266:1: return from a call to test_true
  264.       test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
  265.       return 0;
  266. > }
  267.   
  268.   int test_false(const char *file, int line, const char *s, int b)

test/bntest.c:406:11: Taking true branch
404.   
405.       /* must be odd for montgomery */
406.       if (!(TEST_true(BN_bntest_rand(m, 1024, 0, 1))
                 ^
407.               /* Zero exponent */
408.               && TEST_true(BN_bntest_rand(a, 1024, 0, 0))))

test/bntest.c:591:2: 
589.       st = 1;
590.   
591. >  err:
592.       BN_MONT_CTX_free(mont);
593.       BN_free(a);

test/bntest.c:592:5: 
590.   
591.    err:
592. >     BN_MONT_CTX_free(mont);
593.       BN_free(a);
594.       BN_free(p);

crypto/bn/bn_mont.c:252:1: start of procedure BN_MONT_CTX_free()
  250.   }
  251.   
  252. > void BN_MONT_CTX_free(BN_MONT_CTX *mont)
  253.   {
  254.       if (mont == NULL)

crypto/bn/bn_mont.c:254:9: Taking false branch
  252.   void BN_MONT_CTX_free(BN_MONT_CTX *mont)
  253.   {
  254.       if (mont == NULL)
                 ^
  255.           return;
  256.       BN_clear_free(&mont->RR);

crypto/bn/bn_mont.c:256:5: Skipping BN_clear_free(): empty list of specs
  254.       if (mont == NULL)
  255.           return;
  256.       BN_clear_free(&mont->RR);
             ^
  257.       BN_clear_free(&mont->N);
  258.       BN_clear_free(&mont->Ni);

crypto/bn/bn_mont.c:257:5: Skipping BN_clear_free(): empty list of specs
  255.           return;
  256.       BN_clear_free(&mont->RR);
  257.       BN_clear_free(&mont->N);
             ^
  258.       BN_clear_free(&mont->Ni);
  259.       if (mont->flags & BN_FLG_MALLOCED)

crypto/bn/bn_mont.c:258:5: Skipping BN_clear_free(): empty list of specs
  256.       BN_clear_free(&mont->RR);
  257.       BN_clear_free(&mont->N);
  258.       BN_clear_free(&mont->Ni);
             ^
  259.       if (mont->flags & BN_FLG_MALLOCED)
  260.           OPENSSL_free(mont);

crypto/bn/bn_mont.c:259:9: Taking false branch
  257.       BN_clear_free(&mont->N);
  258.       BN_clear_free(&mont->Ni);
  259.       if (mont->flags & BN_FLG_MALLOCED)
                 ^
  260.           OPENSSL_free(mont);
  261.   }

crypto/bn/bn_mont.c:259:5: 
  257.       BN_clear_free(&mont->N);
  258.       BN_clear_free(&mont->Ni);
  259. >     if (mont->flags & BN_FLG_MALLOCED)
  260.           OPENSSL_free(mont);
  261.   }

crypto/bn/bn_mont.c:261:1: return from a call to BN_MONT_CTX_free
  259.       if (mont->flags & BN_FLG_MALLOCED)
  260.           OPENSSL_free(mont);
  261. > }
  262.   
  263.   int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
