test/exptest.c:178: error: MEMORY_LEAK
  memory dynamically allocated by call to `BN_new()` at line 114, column 9 is not reachable after line 178, column 5.
Showing all 279 steps of the trace


test/exptest.c:96:1: start of procedure test_exp_mod_zero()
94.    * test_exp_mod_zero tests that x**0 mod 1 == 0. It returns zero on success.
95.    */
96. > static int test_exp_mod_zero()
97.   {
98.       BIGNUM *a = NULL, *p = NULL, *m = NULL;

test/exptest.c:98:5: 
96.   static int test_exp_mod_zero()
97.   {
98. >     BIGNUM *a = NULL, *p = NULL, *m = NULL;
99.       BIGNUM *r = NULL;
100.       BN_ULONG one_word = 1;

test/exptest.c:99:5: 
97.   {
98.       BIGNUM *a = NULL, *p = NULL, *m = NULL;
99. >     BIGNUM *r = NULL;
100.       BN_ULONG one_word = 1;
101.       BN_CTX *ctx = BN_CTX_new();

test/exptest.c:100:5: 
98.       BIGNUM *a = NULL, *p = NULL, *m = NULL;
99.       BIGNUM *r = NULL;
100. >     BN_ULONG one_word = 1;
101.       BN_CTX *ctx = BN_CTX_new();
102.       int ret = 1, failed = 0;

test/exptest.c:101:5: 
99.       BIGNUM *r = NULL;
100.       BN_ULONG one_word = 1;
101. >     BN_CTX *ctx = BN_CTX_new();
102.       int ret = 1, failed = 0;
103.   

crypto/bn/bn_ctx.c:188:1: start of procedure BN_CTX_new()
  186.   
  187.   
  188. > BN_CTX *BN_CTX_new(void)
  189.   {
  190.       BN_CTX *ret;

crypto/bn/bn_ctx.c:192:9: 
  190.       BN_CTX *ret;
  191.   
  192. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  193.           BNerr(BN_F_BN_CTX_NEW, ERR_R_MALLOC_FAILURE);
  194.           return NULL;

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
    154.   }
    155.   
    156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158. >     void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
      117.   }
      118.   
      119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121.       void *ret = NULL;

crypto/mem.c:121:5: 
      119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121. >     void *ret = NULL;
      122.   
      123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

crypto/mem.c:126:5: 
      124.           return NULL;
      125.   
      126. >     allow_customize = 0;
      127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
      152.   
      153.       return ret;
      154. > }
      155.   
      156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
    158.       void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)
                   ^
    161.           memset(ret, 0, num);
    162.       return ret;

crypto/mem.c:161:9: 
    159.   
    160.       if (ret != NULL)
    161. >         memset(ret, 0, num);
    162.       return ret;
    163.   }

crypto/mem.c:162:5: 
    160.       if (ret != NULL)
    161.           memset(ret, 0, num);
    162. >     return ret;
    163.   }
    164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
    161.           memset(ret, 0, num);
    162.       return ret;
    163. > }
    164.   
    165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/bn/bn_ctx.c:192:9: Taking false branch
  190.       BN_CTX *ret;
  191.   
  192.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                 ^
  193.           BNerr(BN_F_BN_CTX_NEW, ERR_R_MALLOC_FAILURE);
  194.           return NULL;

crypto/bn/bn_ctx.c:197:5: 
  195.       }
  196.       /* Initialise the structure */
  197. >     BN_POOL_init(&ret->pool);
  198.       BN_STACK_init(&ret->stack);
  199.       return ret;

crypto/bn/bn_ctx.c:334:1: start of procedure BN_POOL_init()
    332.   /***********/
    333.   
    334. > static void BN_POOL_init(BN_POOL *p)
    335.   {
    336.       p->head = p->current = p->tail = NULL;

crypto/bn/bn_ctx.c:336:5: 
    334.   static void BN_POOL_init(BN_POOL *p)
    335.   {
    336. >     p->head = p->current = p->tail = NULL;
    337.       p->used = p->size = 0;
    338.   }

crypto/bn/bn_ctx.c:337:5: 
    335.   {
    336.       p->head = p->current = p->tail = NULL;
    337. >     p->used = p->size = 0;
    338.   }
    339.   

crypto/bn/bn_ctx.c:338:1: return from a call to BN_POOL_init
    336.       p->head = p->current = p->tail = NULL;
    337.       p->used = p->size = 0;
    338. > }
    339.   
    340.   static void BN_POOL_finish(BN_POOL *p)

crypto/bn/bn_ctx.c:198:5: 
  196.       /* Initialise the structure */
  197.       BN_POOL_init(&ret->pool);
  198. >     BN_STACK_init(&ret->stack);
  199.       return ret;
  200.   }

crypto/bn/bn_ctx.c:293:1: start of procedure BN_STACK_init()
    291.   /************/
    292.   
    293. > static void BN_STACK_init(BN_STACK *st)
    294.   {
    295.       st->indexes = NULL;

crypto/bn/bn_ctx.c:295:5: 
    293.   static void BN_STACK_init(BN_STACK *st)
    294.   {
    295. >     st->indexes = NULL;
    296.       st->depth = st->size = 0;
    297.   }

crypto/bn/bn_ctx.c:296:5: 
    294.   {
    295.       st->indexes = NULL;
    296. >     st->depth = st->size = 0;
    297.   }
    298.   

crypto/bn/bn_ctx.c:297:1: return from a call to BN_STACK_init
    295.       st->indexes = NULL;
    296.       st->depth = st->size = 0;
    297. > }
    298.   
    299.   static void BN_STACK_finish(BN_STACK *st)

crypto/bn/bn_ctx.c:199:5: 
  197.       BN_POOL_init(&ret->pool);
  198.       BN_STACK_init(&ret->stack);
  199. >     return ret;
  200.   }
  201.   

crypto/bn/bn_ctx.c:200:1: return from a call to BN_CTX_new
  198.       BN_STACK_init(&ret->stack);
  199.       return ret;
  200. > }
  201.   
  202.   BN_CTX *BN_CTX_secure_new(void)

test/exptest.c:102:5: 
100.       BN_ULONG one_word = 1;
101.       BN_CTX *ctx = BN_CTX_new();
102. >     int ret = 1, failed = 0;
103.   
104.       m = BN_new();

test/exptest.c:104:5: 
102.       int ret = 1, failed = 0;
103.   
104. >     m = BN_new();
105.       if (!m)
106.           goto err;

crypto/bn/bn_lib.c:276:1: start of procedure BN_new()
  274.   }
  275.   
  276. > BIGNUM *BN_new(void)
  277.   {
  278.       BIGNUM *ret;

crypto/bn/bn_lib.c:280:9: 
  278.       BIGNUM *ret;
  279.   
  280. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
    154.   }
    155.   
    156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158. >     void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
      117.   }
      118.   
      119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121.       void *ret = NULL;

crypto/mem.c:121:5: 
      119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121. >     void *ret = NULL;
      122.   
      123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

crypto/mem.c:126:5: 
      124.           return NULL;
      125.   
      126. >     allow_customize = 0;
      127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
      152.   
      153.       return ret;
      154. > }
      155.   
      156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
    158.       void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)
                   ^
    161.           memset(ret, 0, num);
    162.       return ret;

crypto/mem.c:161:9: 
    159.   
    160.       if (ret != NULL)
    161. >         memset(ret, 0, num);
    162.       return ret;
    163.   }

crypto/mem.c:162:5: 
    160.       if (ret != NULL)
    161.           memset(ret, 0, num);
    162. >     return ret;
    163.   }
    164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
    161.           memset(ret, 0, num);
    162.       return ret;
    163. > }
    164.   
    165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/bn/bn_lib.c:280:9: Taking false branch
  278.       BIGNUM *ret;
  279.   
  280.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                 ^
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/bn/bn_lib.c:284:5: 
  282.           return (NULL);
  283.       }
  284. >     ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286.       return (ret);

crypto/bn/bn_lib.c:286:5: 
  284.       ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286. >     return (ret);
  287.   }
  288.   

crypto/bn/bn_lib.c:287:1: return from a call to BN_new
  285.       bn_check_top(ret);
  286.       return (ret);
  287. > }
  288.   
  289.    BIGNUM *BN_secure_new(void)

test/exptest.c:105:10: Taking false branch
103.   
104.       m = BN_new();
105.       if (!m)
                ^
106.           goto err;
107.       BN_one(m);

test/exptest.c:107:5: 
105.       if (!m)
106.           goto err;
107. >     BN_one(m);
108.   
109.       a = BN_new();

crypto/bn/bn_lib.c:529:1: start of procedure BN_set_word()
  527.   }
  528.   
  529. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  530.   {
  531.       bn_check_top(a);

crypto/bn/bn_lib.c:532:9: Condition is true
  530.   {
  531.       bn_check_top(a);
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  533.           return (0);
  534.       a->neg = 0;

crypto/bn/bn_lib.c:532:9: Taking false branch
  530.   {
  531.       bn_check_top(a);
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  533.           return (0);
  534.       a->neg = 0;

crypto/bn/bn_lib.c:534:5: 
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  533.           return (0);
  534. >     a->neg = 0;
  535.       a->d[0] = w;
  536.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:535:5: 
  533.           return (0);
  534.       a->neg = 0;
  535. >     a->d[0] = w;
  536.       a->top = (w ? 1 : 0);
  537.       bn_check_top(a);

crypto/bn/bn_lib.c:536:15: Condition is true
  534.       a->neg = 0;
  535.       a->d[0] = w;
  536.       a->top = (w ? 1 : 0);
                       ^
  537.       bn_check_top(a);
  538.       return (1);

crypto/bn/bn_lib.c:536:5: 
  534.       a->neg = 0;
  535.       a->d[0] = w;
  536. >     a->top = (w ? 1 : 0);
  537.       bn_check_top(a);
  538.       return (1);

crypto/bn/bn_lib.c:538:5: 
  536.       a->top = (w ? 1 : 0);
  537.       bn_check_top(a);
  538. >     return (1);
  539.   }
  540.   

crypto/bn/bn_lib.c:539:1: return from a call to BN_set_word
  537.       bn_check_top(a);
  538.       return (1);
  539. > }
  540.   
  541.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

test/exptest.c:109:5: 
107.       BN_one(m);
108.   
109. >     a = BN_new();
110.       if (!a)
111.           goto err;

crypto/bn/bn_lib.c:276:1: start of procedure BN_new()
  274.   }
  275.   
  276. > BIGNUM *BN_new(void)
  277.   {
  278.       BIGNUM *ret;

crypto/bn/bn_lib.c:280:9: 
  278.       BIGNUM *ret;
  279.   
  280. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
    154.   }
    155.   
    156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158. >     void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
      117.   }
      118.   
      119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121.       void *ret = NULL;

crypto/mem.c:121:5: 
      119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121. >     void *ret = NULL;
      122.   
      123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

crypto/mem.c:126:5: 
      124.           return NULL;
      125.   
      126. >     allow_customize = 0;
      127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
      152.   
      153.       return ret;
      154. > }
      155.   
      156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
    158.       void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)
                   ^
    161.           memset(ret, 0, num);
    162.       return ret;

crypto/mem.c:161:9: 
    159.   
    160.       if (ret != NULL)
    161. >         memset(ret, 0, num);
    162.       return ret;
    163.   }

crypto/mem.c:162:5: 
    160.       if (ret != NULL)
    161.           memset(ret, 0, num);
    162. >     return ret;
    163.   }
    164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
    161.           memset(ret, 0, num);
    162.       return ret;
    163. > }
    164.   
    165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/bn/bn_lib.c:280:9: Taking false branch
  278.       BIGNUM *ret;
  279.   
  280.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                 ^
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/bn/bn_lib.c:284:5: 
  282.           return (NULL);
  283.       }
  284. >     ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286.       return (ret);

crypto/bn/bn_lib.c:286:5: 
  284.       ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286. >     return (ret);
  287.   }
  288.   

crypto/bn/bn_lib.c:287:1: return from a call to BN_new
  285.       bn_check_top(ret);
  286.       return (ret);
  287. > }
  288.   
  289.    BIGNUM *BN_secure_new(void)

test/exptest.c:110:10: Taking false branch
108.   
109.       a = BN_new();
110.       if (!a)
                ^
111.           goto err;
112.       BN_one(a);

test/exptest.c:112:5: 
110.       if (!a)
111.           goto err;
112. >     BN_one(a);
113.   
114.       p = BN_new();

crypto/bn/bn_lib.c:529:1: start of procedure BN_set_word()
  527.   }
  528.   
  529. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  530.   {
  531.       bn_check_top(a);

crypto/bn/bn_lib.c:532:9: Condition is true
  530.   {
  531.       bn_check_top(a);
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  533.           return (0);
  534.       a->neg = 0;

crypto/bn/bn_lib.c:532:9: Taking false branch
  530.   {
  531.       bn_check_top(a);
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  533.           return (0);
  534.       a->neg = 0;

crypto/bn/bn_lib.c:534:5: 
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  533.           return (0);
  534. >     a->neg = 0;
  535.       a->d[0] = w;
  536.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:535:5: 
  533.           return (0);
  534.       a->neg = 0;
  535. >     a->d[0] = w;
  536.       a->top = (w ? 1 : 0);
  537.       bn_check_top(a);

crypto/bn/bn_lib.c:536:15: Condition is true
  534.       a->neg = 0;
  535.       a->d[0] = w;
  536.       a->top = (w ? 1 : 0);
                       ^
  537.       bn_check_top(a);
  538.       return (1);

crypto/bn/bn_lib.c:536:5: 
  534.       a->neg = 0;
  535.       a->d[0] = w;
  536. >     a->top = (w ? 1 : 0);
  537.       bn_check_top(a);
  538.       return (1);

crypto/bn/bn_lib.c:538:5: 
  536.       a->top = (w ? 1 : 0);
  537.       bn_check_top(a);
  538. >     return (1);
  539.   }
  540.   

crypto/bn/bn_lib.c:539:1: return from a call to BN_set_word
  537.       bn_check_top(a);
  538.       return (1);
  539. > }
  540.   
  541.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

test/exptest.c:114:5: 
112.       BN_one(a);
113.   
114. >     p = BN_new();
115.       if (!p)
116.           goto err;

crypto/bn/bn_lib.c:276:1: start of procedure BN_new()
  274.   }
  275.   
  276. > BIGNUM *BN_new(void)
  277.   {
  278.       BIGNUM *ret;

crypto/bn/bn_lib.c:280:9: 
  278.       BIGNUM *ret;
  279.   
  280. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
    154.   }
    155.   
    156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158. >     void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
      117.   }
      118.   
      119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121.       void *ret = NULL;

crypto/mem.c:121:5: 
      119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121. >     void *ret = NULL;
      122.   
      123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

crypto/mem.c:126:5: 
      124.           return NULL;
      125.   
      126. >     allow_customize = 0;
      127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
      152.   
      153.       return ret;
      154. > }
      155.   
      156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
    158.       void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)
                   ^
    161.           memset(ret, 0, num);
    162.       return ret;

crypto/mem.c:161:9: 
    159.   
    160.       if (ret != NULL)
    161. >         memset(ret, 0, num);
    162.       return ret;
    163.   }

crypto/mem.c:162:5: 
    160.       if (ret != NULL)
    161.           memset(ret, 0, num);
    162. >     return ret;
    163.   }
    164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
    161.           memset(ret, 0, num);
    162.       return ret;
    163. > }
    164.   
    165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/bn/bn_lib.c:280:9: Taking false branch
  278.       BIGNUM *ret;
  279.   
  280.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                 ^
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/bn/bn_lib.c:284:5: 
  282.           return (NULL);
  283.       }
  284. >     ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286.       return (ret);

crypto/bn/bn_lib.c:286:5: 
  284.       ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286. >     return (ret);
  287.   }
  288.   

crypto/bn/bn_lib.c:287:1: return from a call to BN_new
  285.       bn_check_top(ret);
  286.       return (ret);
  287. > }
  288.   
  289.    BIGNUM *BN_secure_new(void)

test/exptest.c:115:10: Taking false branch
113.   
114.       p = BN_new();
115.       if (!p)
                ^
116.           goto err;
117.       BN_zero(p);

test/exptest.c:117:5: 
115.       if (!p)
116.           goto err;
117. >     BN_zero(p);
118.   
119.       r = BN_new();

crypto/bn/bn_lib.c:529:1: start of procedure BN_set_word()
  527.   }
  528.   
  529. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  530.   {
  531.       bn_check_top(a);

crypto/bn/bn_lib.c:532:9: Condition is true
  530.   {
  531.       bn_check_top(a);
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  533.           return (0);
  534.       a->neg = 0;

crypto/bn/bn_lib.c:532:9: Taking false branch
  530.   {
  531.       bn_check_top(a);
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  533.           return (0);
  534.       a->neg = 0;

crypto/bn/bn_lib.c:534:5: 
  532.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  533.           return (0);
  534. >     a->neg = 0;
  535.       a->d[0] = w;
  536.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:535:5: 
  533.           return (0);
  534.       a->neg = 0;
  535. >     a->d[0] = w;
  536.       a->top = (w ? 1 : 0);
  537.       bn_check_top(a);

crypto/bn/bn_lib.c:536:15: Condition is false
  534.       a->neg = 0;
  535.       a->d[0] = w;
  536.       a->top = (w ? 1 : 0);
                       ^
  537.       bn_check_top(a);
  538.       return (1);

crypto/bn/bn_lib.c:536:5: 
  534.       a->neg = 0;
  535.       a->d[0] = w;
  536. >     a->top = (w ? 1 : 0);
  537.       bn_check_top(a);
  538.       return (1);

crypto/bn/bn_lib.c:538:5: 
  536.       a->top = (w ? 1 : 0);
  537.       bn_check_top(a);
  538. >     return (1);
  539.   }
  540.   

crypto/bn/bn_lib.c:539:1: return from a call to BN_set_word
  537.       bn_check_top(a);
  538.       return (1);
  539. > }
  540.   
  541.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

test/exptest.c:119:5: 
117.       BN_zero(p);
118.   
119. >     r = BN_new();
120.       if (!r)
121.           goto err;

crypto/bn/bn_lib.c:276:1: start of procedure BN_new()
  274.   }
  275.   
  276. > BIGNUM *BN_new(void)
  277.   {
  278.       BIGNUM *ret;

crypto/bn/bn_lib.c:280:9: 
  278.       BIGNUM *ret;
  279.   
  280. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
    154.   }
    155.   
    156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158. >     void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
      117.   }
      118.   
      119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121.       void *ret = NULL;

crypto/mem.c:121:5: 
      119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121. >     void *ret = NULL;
      122.   
      123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

crypto/mem.c:126:5: 
      124.           return NULL;
      125.   
      126. >     allow_customize = 0;
      127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
      152.   
      153.       return ret;
      154. > }
      155.   
      156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
    158.       void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)
                   ^
    161.           memset(ret, 0, num);
    162.       return ret;

crypto/mem.c:161:9: 
    159.   
    160.       if (ret != NULL)
    161. >         memset(ret, 0, num);
    162.       return ret;
    163.   }

crypto/mem.c:162:5: 
    160.       if (ret != NULL)
    161.           memset(ret, 0, num);
    162. >     return ret;
    163.   }
    164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
    161.           memset(ret, 0, num);
    162.       return ret;
    163. > }
    164.   
    165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/bn/bn_lib.c:280:9: Taking false branch
  278.       BIGNUM *ret;
  279.   
  280.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                 ^
  281.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
  282.           return (NULL);

crypto/bn/bn_lib.c:284:5: 
  282.           return (NULL);
  283.       }
  284. >     ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286.       return (ret);

crypto/bn/bn_lib.c:286:5: 
  284.       ret->flags = BN_FLG_MALLOCED;
  285.       bn_check_top(ret);
  286. >     return (ret);
  287.   }
  288.   

crypto/bn/bn_lib.c:287:1: return from a call to BN_new
  285.       bn_check_top(ret);
  286.       return (ret);
  287. > }
  288.   
  289.    BIGNUM *BN_secure_new(void)

test/exptest.c:120:10: Taking false branch
118.   
119.       r = BN_new();
120.       if (!r)
                ^
121.           goto err;
122.   

test/exptest.c:123:10: 
121.           goto err;
122.   
123. >     if (!BN_rand(a, 1024, 0, 0))
124.           goto err;
125.   

crypto/bn/bn_rand.c:199:1: start of procedure BN_rand()
  197.   }
  198.   
  199. > int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
  200.   {
  201.       return bnrand(0, rnd, bits, top, bottom);

crypto/bn/bn_rand.c:201:5: 
  199.   int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
  200.   {
  201. >     return bnrand(0, rnd, bits, top, bottom);
  202.   }
  203.   

crypto/bn/bn_rand.c:118:1: start of procedure bnrand()
    116.   #include <openssl/sha.h>
    117.   
    118. > static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
    119.   {
    120.       unsigned char *buf = NULL;

crypto/bn/bn_rand.c:120:5: 
    118.   static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
    119.   {
    120. >     unsigned char *buf = NULL;
    121.       int ret = 0, bit, bytes, mask;
    122.       time_t tim;

crypto/bn/bn_rand.c:121:5: 
    119.   {
    120.       unsigned char *buf = NULL;
    121. >     int ret = 0, bit, bytes, mask;
    122.       time_t tim;
    123.   

crypto/bn/bn_rand.c:124:9: Taking false branch
    122.       time_t tim;
    123.   
    124.       if (bits < 0 || (bits == 1 && top > 0)) {
                   ^
    125.           BNerr(BN_F_BNRAND, BN_R_BITS_TOO_SMALL);
    126.           return 0;

crypto/bn/bn_rand.c:124:22: Taking false branch
    122.       time_t tim;
    123.   
    124.       if (bits < 0 || (bits == 1 && top > 0)) {
                                ^
    125.           BNerr(BN_F_BNRAND, BN_R_BITS_TOO_SMALL);
    126.           return 0;

crypto/bn/bn_rand.c:129:9: Taking false branch
    127.       }
    128.   
    129.       if (bits == 0) {
                   ^
    130.           BN_zero(rnd);
    131.           return 1;

crypto/bn/bn_rand.c:134:5: 
    132.       }
    133.   
    134. >     bytes = (bits + 7) / 8;
    135.       bit = (bits - 1) % 8;
    136.       mask = 0xff << (bit + 1);

crypto/bn/bn_rand.c:135:5: 
    133.   
    134.       bytes = (bits + 7) / 8;
    135. >     bit = (bits - 1) % 8;
    136.       mask = 0xff << (bit + 1);
    137.   

crypto/bn/bn_rand.c:136:5: 
    134.       bytes = (bits + 7) / 8;
    135.       bit = (bits - 1) % 8;
    136. >     mask = 0xff << (bit + 1);
    137.   
    138.       buf = OPENSSL_malloc(bytes);

crypto/bn/bn_rand.c:138:5: 
    136.       mask = 0xff << (bit + 1);
    137.   
    138. >     buf = OPENSSL_malloc(bytes);
    139.       if (buf == NULL) {
    140.           BNerr(BN_F_BNRAND, ERR_R_MALLOC_FAILURE);

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
      117.   }
      118.   
      119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121.       void *ret = NULL;

crypto/mem.c:121:5: 
      119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      120.   {
      121. >     void *ret = NULL;
      122.   
      123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

crypto/mem.c:126:5: 
      124.           return NULL;
      125.   
      126. >     allow_customize = 0;
      127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
      152.   
      153.       return ret;
      154. > }
      155.   
      156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/bn/bn_rand.c:139:9: Taking false branch
    137.   
    138.       buf = OPENSSL_malloc(bytes);
    139.       if (buf == NULL) {
                   ^
    140.           BNerr(BN_F_BNRAND, ERR_R_MALLOC_FAILURE);
    141.           goto err;

crypto/bn/bn_rand.c:145:5: 
    143.   
    144.       /* make a random number and set the top and bottom bits */
    145. >     time(&tim);
    146.       RAND_add(&tim, sizeof(tim), 0.0);
    147.   

crypto/bn/bn_rand.c:146:5: 
    144.       /* make a random number and set the top and bottom bits */
    145.       time(&tim);
    146. >     RAND_add(&tim, sizeof(tim), 0.0);
    147.   
    148.       if (pseudorand) {

crypto/rand/rand_lib.c:147:1: start of procedure RAND_add()
      145.   }
      146.   
      147. > void RAND_add(const void *buf, int num, double entropy)
      148.   {
      149.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:149:5: 
      147.   void RAND_add(const void *buf, int num, double entropy)
      148.   {
      149. >     const RAND_METHOD *meth = RAND_get_rand_method();
      150.       if (meth && meth->add)
      151.           meth->add(buf, num, entropy);

crypto/rand/rand_lib.c:91:1: start of procedure RAND_get_rand_method()
        89.   }
        90.   
        91. > const RAND_METHOD *RAND_get_rand_method(void)
        92.   {
        93.       if (!default_RAND_meth) {

crypto/rand/rand_lib.c:93:10: Taking true branch
        91.   const RAND_METHOD *RAND_get_rand_method(void)
        92.   {
        93.       if (!default_RAND_meth) {
                       ^
        94.   #ifndef OPENSSL_NO_ENGINE
        95.           ENGINE *e = ENGINE_get_default_RAND();

crypto/rand/rand_lib.c:95:9: 
        93.       if (!default_RAND_meth) {
        94.   #ifndef OPENSSL_NO_ENGINE
        95. >         ENGINE *e = ENGINE_get_default_RAND();
        96.           if (e) {
        97.               default_RAND_meth = ENGINE_get_RAND(e);

crypto/engine/tb_rand.c:108:1: start of procedure ENGINE_get_default_RAND()
          106.    * references).
          107.    */
          108. > ENGINE *ENGINE_get_default_RAND(void)
          109.   {
          110.       return engine_table_select(&rand_table, dummy_nid);

crypto/engine/tb_rand.c:110:5: 
          108.   ENGINE *ENGINE_get_default_RAND(void)
          109.   {
          110. >     return engine_table_select(&rand_table, dummy_nid);
          111.   }
          112.   

crypto/engine/eng_table.c:233:1: start of procedure engine_table_select()
            231.   /* return a functional reference for a given 'nid' */
            232.   #ifndef ENGINE_TABLE_DEBUG
            233. > ENGINE *engine_table_select(ENGINE_TABLE **table, int nid)
            234.   #else
            235.   ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f,

crypto/engine/eng_table.c:239:5: 
            237.   #endif
            238.   {
            239. >     ENGINE *ret = NULL;
            240.       ENGINE_PILE tmplate, *fnd = NULL;
            241.       int initres, loop = 0;

crypto/engine/eng_table.c:240:5: 
            238.   {
            239.       ENGINE *ret = NULL;
            240. >     ENGINE_PILE tmplate, *fnd = NULL;
            241.       int initres, loop = 0;
            242.   

crypto/engine/eng_table.c:241:5: 
            239.       ENGINE *ret = NULL;
            240.       ENGINE_PILE tmplate, *fnd = NULL;
            241. >     int initres, loop = 0;
            242.   
            243.       if (!(*table)) {

crypto/engine/eng_table.c:243:11: 
            241.       int initres, loop = 0;
            242.   
            243. >     if (!(*table)) {
            244.   #ifdef ENGINE_TABLE_DEBUG
            245.           fprintf(stderr, "engine_table_dbg: %s:%d, nid=%d, nothing "

crypto/engine/eng_table.c:243:10: Taking true branch
            241.       int initres, loop = 0;
            242.   
            243.       if (!(*table)) {
                            ^
            244.   #ifdef ENGINE_TABLE_DEBUG
            245.           fprintf(stderr, "engine_table_dbg: %s:%d, nid=%d, nothing "

crypto/engine/eng_table.c:248:9: 
            246.                   "registered!\n", f, l, nid);
            247.   #endif
            248. >         return NULL;
            249.       }
            250.       ERR_set_mark();

crypto/engine/eng_table.c:329:1: return from a call to engine_table_select
            327.       ERR_pop_to_mark();
            328.       return ret;
            329. > }
            330.   
            331.   /* Table enumeration */

crypto/engine/tb_rand.c:111:1: return from a call to ENGINE_get_default_RAND
          109.   {
          110.       return engine_table_select(&rand_table, dummy_nid);
          111. > }
          112.   
          113.   /* Obtains an RAND implementation from an ENGINE functional reference */

crypto/rand/rand_lib.c:96:13: Taking false branch
        94.   #ifndef OPENSSL_NO_ENGINE
        95.           ENGINE *e = ENGINE_get_default_RAND();
        96.           if (e) {
                          ^
        97.               default_RAND_meth = ENGINE_get_RAND(e);
        98.               if (!default_RAND_meth) {

crypto/rand/rand_lib.c:103:13: Taking false branch
        101.               }
        102.           }
        103.           if (e)
                           ^
        104.               funct_ref = e;
        105.           else

crypto/rand/rand_lib.c:107:13: 
        105.           else
        106.   #endif
        107. >             default_RAND_meth = RAND_OpenSSL();
        108.       }
        109.       return default_RAND_meth;

crypto/rand/md_rand.c:193:1: start of procedure RAND_OpenSSL()
          191.   };
          192.   
          193. > RAND_METHOD *RAND_OpenSSL(void)
          194.   {
          195.       return (&rand_meth);

crypto/rand/md_rand.c:195:5: 
          193.   RAND_METHOD *RAND_OpenSSL(void)
          194.   {
          195. >     return (&rand_meth);
          196.   }
          197.   

crypto/rand/md_rand.c:196:1: return from a call to RAND_OpenSSL
          194.   {
          195.       return (&rand_meth);
          196. > }
          197.   
          198.   static void rand_cleanup(void)

crypto/rand/rand_lib.c:109:5: 
        107.               default_RAND_meth = RAND_OpenSSL();
        108.       }
        109. >     return default_RAND_meth;
        110.   }
        111.   

crypto/rand/rand_lib.c:110:1: return from a call to RAND_get_rand_method
        108.       }
        109.       return default_RAND_meth;
        110. > }
        111.   
        112.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:150:9: Taking true branch
      148.   {
      149.       const RAND_METHOD *meth = RAND_get_rand_method();
      150.       if (meth && meth->add)
                     ^
      151.           meth->add(buf, num, entropy);
      152.   }

crypto/rand/rand_lib.c:150:17: Taking false branch
      148.   {
      149.       const RAND_METHOD *meth = RAND_get_rand_method();
      150.       if (meth && meth->add)
                             ^
      151.           meth->add(buf, num, entropy);
      152.   }

crypto/rand/rand_lib.c:150:5: 
      148.   {
      149.       const RAND_METHOD *meth = RAND_get_rand_method();
      150. >     if (meth && meth->add)
      151.           meth->add(buf, num, entropy);
      152.   }

crypto/rand/rand_lib.c:152:1: return from a call to RAND_add
      150.       if (meth && meth->add)
      151.           meth->add(buf, num, entropy);
      152. > }
      153.   
      154.   int RAND_bytes(unsigned char *buf, int num)

crypto/bn/bn_rand.c:148:9: Taking false branch
    146.       RAND_add(&tim, sizeof(tim), 0.0);
    147.   
    148.       if (pseudorand) {
                   ^
    149.           if (RAND_bytes(buf, bytes) <= 0)
    150.               goto err;

crypto/bn/bn_rand.c:152:13: 
    150.               goto err;
    151.       } else {
    152. >         if (RAND_bytes(buf, bytes) <= 0)
    153.               goto err;
    154.       }

crypto/rand/rand_lib.c:154:1: start of procedure RAND_bytes()
      152.   }
      153.   
      154. > int RAND_bytes(unsigned char *buf, int num)
      155.   {
      156.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:156:5: 
      154.   int RAND_bytes(unsigned char *buf, int num)
      155.   {
      156. >     const RAND_METHOD *meth = RAND_get_rand_method();
      157.       if (meth && meth->bytes)
      158.           return meth->bytes(buf, num);

crypto/rand/rand_lib.c:91:1: start of procedure RAND_get_rand_method()
        89.   }
        90.   
        91. > const RAND_METHOD *RAND_get_rand_method(void)
        92.   {
        93.       if (!default_RAND_meth) {

crypto/rand/rand_lib.c:93:10: Taking false branch
        91.   const RAND_METHOD *RAND_get_rand_method(void)
        92.   {
        93.       if (!default_RAND_meth) {
                       ^
        94.   #ifndef OPENSSL_NO_ENGINE
        95.           ENGINE *e = ENGINE_get_default_RAND();

crypto/rand/rand_lib.c:109:5: 
        107.               default_RAND_meth = RAND_OpenSSL();
        108.       }
        109. >     return default_RAND_meth;
        110.   }
        111.   

crypto/rand/rand_lib.c:110:1: return from a call to RAND_get_rand_method
        108.       }
        109.       return default_RAND_meth;
        110. > }
        111.   
        112.   #ifndef OPENSSL_NO_ENGINE

crypto/rand/rand_lib.c:157:9: Taking true branch
      155.   {
      156.       const RAND_METHOD *meth = RAND_get_rand_method();
      157.       if (meth && meth->bytes)
                     ^
      158.           return meth->bytes(buf, num);
      159.       return (-1);

crypto/rand/rand_lib.c:157:17: Taking false branch
      155.   {
      156.       const RAND_METHOD *meth = RAND_get_rand_method();
      157.       if (meth && meth->bytes)
                             ^
      158.           return meth->bytes(buf, num);
      159.       return (-1);

crypto/rand/rand_lib.c:159:5: 
      157.       if (meth && meth->bytes)
      158.           return meth->bytes(buf, num);
      159. >     return (-1);
      160.   }
      161.   

crypto/rand/rand_lib.c:160:1: return from a call to RAND_bytes
      158.           return meth->bytes(buf, num);
      159.       return (-1);
      160. > }
      161.   
      162.   #if OPENSSL_API_COMPAT < 0x10100000L

crypto/bn/bn_rand.c:152:13: Taking true branch
    150.               goto err;
    151.       } else {
    152.           if (RAND_bytes(buf, bytes) <= 0)
                       ^
    153.               goto err;
    154.       }

crypto/bn/bn_rand.c:193:2: 
    191.           goto err;
    192.       ret = 1;
    193. >  err:
    194.       OPENSSL_clear_free(buf, bytes);
    195.       bn_check_top(rnd);

crypto/bn/bn_rand.c:194:5: 
    192.       ret = 1;
    193.    err:
    194. >     OPENSSL_clear_free(buf, bytes);
    195.       bn_check_top(rnd);
    196.       return (ret);

crypto/mem.c:248:1: start of procedure CRYPTO_clear_free()
      246.   }
      247.   
      248. > void CRYPTO_clear_free(void *str, size_t num)
      249.   {
      250.       if (str == NULL)

crypto/mem.c:250:9: Taking false branch
      248.   void CRYPTO_clear_free(void *str, size_t num)
      249.   {
      250.       if (str == NULL)
                     ^
      251.           return;
      252.       if (num)

crypto/mem.c:252:9: Taking true branch
      250.       if (str == NULL)
      251.           return;
      252.       if (num)
                     ^
      253.           OPENSSL_cleanse(str, num);
      254.       CRYPTO_free(str);

crypto/mem.c:253:9: Skipping OPENSSL_cleanse(): method has no implementation
      251.           return;
      252.       if (num)
      253.           OPENSSL_cleanse(str, num);
                     ^
      254.       CRYPTO_free(str);
      255.   }

crypto/mem.c:254:5: 
      252.       if (num)
      253.           OPENSSL_cleanse(str, num);
      254. >     CRYPTO_free(str);
      255.   }

crypto/mem.c:233:1: start of procedure CRYPTO_free()
        231.   }
        232.   
        233. > void CRYPTO_free(void *str)
        234.   {
        235.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:244:5: 
        242.       }
        243.   #else
        244. >     free(str);
        245.   #endif
        246.   }

crypto/mem.c:246:1: return from a call to CRYPTO_free
        244.       free(str);
        245.   #endif
        246. > }
        247.   
        248.   void CRYPTO_clear_free(void *str, size_t num)

crypto/mem.c:255:1: return from a call to CRYPTO_clear_free
      253.           OPENSSL_cleanse(str, num);
      254.       CRYPTO_free(str);
      255. > }

crypto/bn/bn_rand.c:196:5: 
    194.       OPENSSL_clear_free(buf, bytes);
    195.       bn_check_top(rnd);
    196. >     return (ret);
    197.   }
    198.   

crypto/bn/bn_rand.c:197:1: return from a call to bnrand
    195.       bn_check_top(rnd);
    196.       return (ret);
    197. > }
    198.   
    199.   int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)

crypto/bn/bn_rand.c:202:1: return from a call to BN_rand
  200.   {
  201.       return bnrand(0, rnd, bits, top, bottom);
  202. > }
  203.   
  204.   int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom)

test/exptest.c:123:10: Taking true branch
121.           goto err;
122.   
123.       if (!BN_rand(a, 1024, 0, 0))
                ^
124.           goto err;
125.   

test/exptest.c:175:2: 
173.       ret = failed;
174.   
175. >  err:
176.       BN_free(r);
177.       BN_free(a);

test/exptest.c:176:5: 
174.   
175.    err:
176. >     BN_free(r);
177.       BN_free(a);
178.       BN_free(p);

crypto/bn/bn_lib.c:251:1: start of procedure BN_free()
  249.   }
  250.   
  251. > void BN_free(BIGNUM *a)
  252.   {
  253.       if (a == NULL)

crypto/bn/bn_lib.c:253:9: Taking false branch
  251.   void BN_free(BIGNUM *a)
  252.   {
  253.       if (a == NULL)
                 ^
  254.           return;
  255.       bn_check_top(a);

crypto/bn/bn_lib.c:256:10: 
  254.           return;
  255.       bn_check_top(a);
  256. >     if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)

crypto/bn/bn_lib.c:964:1: start of procedure BN_get_flags()
    962.   }
    963.   
    964. > int BN_get_flags(const BIGNUM *b, int n)
    965.   {
    966.       return b->flags & n;

crypto/bn/bn_lib.c:966:5: 
    964.   int BN_get_flags(const BIGNUM *b, int n)
    965.   {
    966. >     return b->flags & n;
    967.   }
    968.   

crypto/bn/bn_lib.c:967:1: return from a call to BN_get_flags
    965.   {
    966.       return b->flags & n;
    967. > }
    968.   
    969.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:256:10: Taking false branch
  254.           return;
  255.       bn_check_top(a);
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
                  ^
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)

crypto/bn/bn_lib.c:258:9: Taking false branch
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)
                 ^
  259.           OPENSSL_free(a);
  260.       else {

crypto/bn/bn_lib.c:262:9: 
  260.       else {
  261.   #if OPENSSL_API_COMPAT < 0x00908000L
  262. >         a->flags |= BN_FLG_FREE;
  263.   #endif
  264.           a->d = NULL;

crypto/bn/bn_lib.c:264:9: 
  262.           a->flags |= BN_FLG_FREE;
  263.   #endif
  264. >         a->d = NULL;
  265.       }
  266.   }

crypto/bn/bn_lib.c:258:5: 
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258. >     if (a->flags & BN_FLG_MALLOCED)
  259.           OPENSSL_free(a);
  260.       else {

crypto/bn/bn_lib.c:266:1: return from a call to BN_free
  264.           a->d = NULL;
  265.       }
  266. > }
  267.   
  268.   void bn_init(BIGNUM *a)

test/exptest.c:177:5: 
175.    err:
176.       BN_free(r);
177. >     BN_free(a);
178.       BN_free(p);
179.       BN_free(m);

crypto/bn/bn_lib.c:251:1: start of procedure BN_free()
  249.   }
  250.   
  251. > void BN_free(BIGNUM *a)
  252.   {
  253.       if (a == NULL)

crypto/bn/bn_lib.c:253:9: Taking false branch
  251.   void BN_free(BIGNUM *a)
  252.   {
  253.       if (a == NULL)
                 ^
  254.           return;
  255.       bn_check_top(a);

crypto/bn/bn_lib.c:256:10: 
  254.           return;
  255.       bn_check_top(a);
  256. >     if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)

crypto/bn/bn_lib.c:964:1: start of procedure BN_get_flags()
    962.   }
    963.   
    964. > int BN_get_flags(const BIGNUM *b, int n)
    965.   {
    966.       return b->flags & n;

crypto/bn/bn_lib.c:966:5: 
    964.   int BN_get_flags(const BIGNUM *b, int n)
    965.   {
    966. >     return b->flags & n;
    967.   }
    968.   

crypto/bn/bn_lib.c:967:1: return from a call to BN_get_flags
    965.   {
    966.       return b->flags & n;
    967. > }
    968.   
    969.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:256:10: Taking false branch
  254.           return;
  255.       bn_check_top(a);
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
                  ^
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)

crypto/bn/bn_lib.c:258:9: Taking false branch
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)
                 ^
  259.           OPENSSL_free(a);
  260.       else {

crypto/bn/bn_lib.c:262:9: 
  260.       else {
  261.   #if OPENSSL_API_COMPAT < 0x00908000L
  262. >         a->flags |= BN_FLG_FREE;
  263.   #endif
  264.           a->d = NULL;

crypto/bn/bn_lib.c:264:9: 
  262.           a->flags |= BN_FLG_FREE;
  263.   #endif
  264. >         a->d = NULL;
  265.       }
  266.   }

crypto/bn/bn_lib.c:258:5: 
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258. >     if (a->flags & BN_FLG_MALLOCED)
  259.           OPENSSL_free(a);
  260.       else {

crypto/bn/bn_lib.c:266:1: return from a call to BN_free
  264.           a->d = NULL;
  265.       }
  266. > }
  267.   
  268.   void bn_init(BIGNUM *a)

test/exptest.c:178:5: 
176.       BN_free(r);
177.       BN_free(a);
178. >     BN_free(p);
179.       BN_free(m);
180.       BN_CTX_free(ctx);

crypto/bn/bn_lib.c:251:1: start of procedure BN_free()
  249.   }
  250.   
  251. > void BN_free(BIGNUM *a)
  252.   {
  253.       if (a == NULL)

crypto/bn/bn_lib.c:253:9: Taking false branch
  251.   void BN_free(BIGNUM *a)
  252.   {
  253.       if (a == NULL)
                 ^
  254.           return;
  255.       bn_check_top(a);

crypto/bn/bn_lib.c:256:10: 
  254.           return;
  255.       bn_check_top(a);
  256. >     if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)

crypto/bn/bn_lib.c:964:1: start of procedure BN_get_flags()
    962.   }
    963.   
    964. > int BN_get_flags(const BIGNUM *b, int n)
    965.   {
    966.       return b->flags & n;

crypto/bn/bn_lib.c:966:5: 
    964.   int BN_get_flags(const BIGNUM *b, int n)
    965.   {
    966. >     return b->flags & n;
    967.   }
    968.   

crypto/bn/bn_lib.c:967:1: return from a call to BN_get_flags
    965.   {
    966.       return b->flags & n;
    967. > }
    968.   
    969.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:256:10: Taking false branch
  254.           return;
  255.       bn_check_top(a);
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
                  ^
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)

crypto/bn/bn_lib.c:258:9: Taking false branch
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258.       if (a->flags & BN_FLG_MALLOCED)
                 ^
  259.           OPENSSL_free(a);
  260.       else {

crypto/bn/bn_lib.c:262:9: 
  260.       else {
  261.   #if OPENSSL_API_COMPAT < 0x00908000L
  262. >         a->flags |= BN_FLG_FREE;
  263.   #endif
  264.           a->d = NULL;

crypto/bn/bn_lib.c:264:9: 
  262.           a->flags |= BN_FLG_FREE;
  263.   #endif
  264. >         a->d = NULL;
  265.       }
  266.   }

crypto/bn/bn_lib.c:258:5: 
  256.       if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  257.           bn_free_d(a);
  258. >     if (a->flags & BN_FLG_MALLOCED)
  259.           OPENSSL_free(a);
  260.       else {

crypto/bn/bn_lib.c:266:1: return from a call to BN_free
  264.           a->d = NULL;
  265.       }
  266. > }
  267.   
  268.   void bn_init(BIGNUM *a)
