crypto/rsa/rsa_x931g.c:108: error: MEMORY_LEAK
  memory dynamically allocated by call to `BN_CTX_start()` at line 82, column 5 is not reachable after line 108, column 14.
Showing all 205 steps of the trace


crypto/rsa/rsa_x931g.c:67:1: start of procedure RSA_X931_derive_ex()
65.   /* X9.31 RSA key derivation and generation */
66.   
67. > int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1,
68.                          BIGNUM *q2, const BIGNUM *Xp1, const BIGNUM *Xp2,
69.                          const BIGNUM *Xp, const BIGNUM *Xq1, const BIGNUM *Xq2,

crypto/rsa/rsa_x931g.c:72:5: 
70.                          const BIGNUM *Xq, const BIGNUM *e, BN_GENCB *cb)
71.   {
72. >     BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *r3 = NULL;
73.       BN_CTX *ctx = NULL, *ctx2 = NULL;
74.       int ret = 0;

crypto/rsa/rsa_x931g.c:73:5: 
71.   {
72.       BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *r3 = NULL;
73. >     BN_CTX *ctx = NULL, *ctx2 = NULL;
74.       int ret = 0;
75.   

crypto/rsa/rsa_x931g.c:74:5: 
72.       BIGNUM *r0 = NULL, *r1 = NULL, *r2 = NULL, *r3 = NULL;
73.       BN_CTX *ctx = NULL, *ctx2 = NULL;
74. >     int ret = 0;
75.   
76.       if (!rsa)

crypto/rsa/rsa_x931g.c:76:10: Taking false branch
74.       int ret = 0;
75.   
76.       if (!rsa)
               ^
77.           goto err;
78.   

crypto/rsa/rsa_x931g.c:79:5: 
77.           goto err;
78.   
79. >     ctx = BN_CTX_new();
80.       if (ctx == NULL)
81.           goto err;

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)

crypto/rsa/rsa_x931g.c:80:9: Taking false branch
78.   
79.       ctx = BN_CTX_new();
80.       if (ctx == NULL)
              ^
81.           goto err;
82.       BN_CTX_start(ctx);

crypto/rsa/rsa_x931g.c:82:5: 
80.       if (ctx == NULL)
81.           goto err;
82. >     BN_CTX_start(ctx);
83.   
84.       r0 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:235:1: start of procedure BN_CTX_start()
  233.   }
  234.   
  235. > void BN_CTX_start(BN_CTX *ctx)
  236.   {
  237.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_ctx.c:239:9: Taking false branch
  237.       CTXDBG_ENTRY("BN_CTX_start", ctx);
  238.       /* If we're already overflowing ... */
  239.       if (ctx->err_stack || ctx->too_many)
                 ^
  240.           ctx->err_stack++;
  241.       /* (Try to) get a new frame pointer */

crypto/bn/bn_ctx.c:239:27: Taking false branch
  237.       CTXDBG_ENTRY("BN_CTX_start", ctx);
  238.       /* If we're already overflowing ... */
  239.       if (ctx->err_stack || ctx->too_many)
                                   ^
  240.           ctx->err_stack++;
  241.       /* (Try to) get a new frame pointer */

crypto/bn/bn_ctx.c:242:15: 
  240.           ctx->err_stack++;
  241.       /* (Try to) get a new frame pointer */
  242. >     else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
  243.           BNerr(BN_F_BN_CTX_START, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  244.           ctx->err_stack++;

crypto/bn/bn_ctx.c:306:1: start of procedure BN_STACK_push()
    304.   
    305.   
    306. > static int BN_STACK_push(BN_STACK *st, unsigned int idx)
    307.   {
    308.       if (st->depth == st->size) {

crypto/bn/bn_ctx.c:308:9: Taking true branch
    306.   static int BN_STACK_push(BN_STACK *st, unsigned int idx)
    307.   {
    308.       if (st->depth == st->size) {
                   ^
    309.           /* Need to expand */
    310.           unsigned int newsize =

crypto/bn/bn_ctx.c:311:13: Condition is false
    309.           /* Need to expand */
    310.           unsigned int newsize =
    311.               st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
                       ^
    312.           unsigned int *newitems = OPENSSL_malloc(sizeof(*newitems) * newsize);
    313.           if (newitems == NULL)

crypto/bn/bn_ctx.c:310:9: 
    308.       if (st->depth == st->size) {
    309.           /* Need to expand */
    310. >         unsigned int newsize =
    311.               st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
    312.           unsigned int *newitems = OPENSSL_malloc(sizeof(*newitems) * newsize);

crypto/bn/bn_ctx.c:312:9: 
    310.           unsigned int newsize =
    311.               st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
    312. >         unsigned int *newitems = OPENSSL_malloc(sizeof(*newitems) * newsize);
    313.           if (newitems == NULL)
    314.               return 0;

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_ctx.c:313:13: Taking false branch
    311.               st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
    312.           unsigned int *newitems = OPENSSL_malloc(sizeof(*newitems) * newsize);
    313.           if (newitems == NULL)
                       ^
    314.               return 0;
    315.           if (st->depth)

crypto/bn/bn_ctx.c:315:13: Taking false branch
    313.           if (newitems == NULL)
    314.               return 0;
    315.           if (st->depth)
                       ^
    316.               memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
    317.           OPENSSL_free(st->indexes);

crypto/bn/bn_ctx.c:317:9: 
    315.           if (st->depth)
    316.               memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
    317. >         OPENSSL_free(st->indexes);
    318.           st->indexes = newitems;
    319.           st->size = newsize;

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/bn/bn_ctx.c:318:9: 
    316.               memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
    317.           OPENSSL_free(st->indexes);
    318. >         st->indexes = newitems;
    319.           st->size = newsize;
    320.       }

crypto/bn/bn_ctx.c:319:9: 
    317.           OPENSSL_free(st->indexes);
    318.           st->indexes = newitems;
    319. >         st->size = newsize;
    320.       }
    321.       st->indexes[(st->depth)++] = idx;

crypto/bn/bn_ctx.c:321:5: 
    319.           st->size = newsize;
    320.       }
    321. >     st->indexes[(st->depth)++] = idx;
    322.       return 1;
    323.   }

crypto/bn/bn_ctx.c:322:5: 
    320.       }
    321.       st->indexes[(st->depth)++] = idx;
    322. >     return 1;
    323.   }
    324.   

crypto/bn/bn_ctx.c:323:1: return from a call to BN_STACK_push
    321.       st->indexes[(st->depth)++] = idx;
    322.       return 1;
    323. > }
    324.   
    325.   static unsigned int BN_STACK_pop(BN_STACK *st)

crypto/bn/bn_ctx.c:242:15: Taking false branch
  240.           ctx->err_stack++;
  241.       /* (Try to) get a new frame pointer */
  242.       else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
                       ^
  243.           BNerr(BN_F_BN_CTX_START, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  244.           ctx->err_stack++;

crypto/bn/bn_ctx.c:239:5: 
  237.       CTXDBG_ENTRY("BN_CTX_start", ctx);
  238.       /* If we're already overflowing ... */
  239. >     if (ctx->err_stack || ctx->too_many)
  240.           ctx->err_stack++;
  241.       /* (Try to) get a new frame pointer */

crypto/bn/bn_ctx.c:247:1: return from a call to BN_CTX_start
  245.       }
  246.       CTXDBG_EXIT(ctx);
  247. > }
  248.   
  249.   void BN_CTX_end(BN_CTX *ctx)

crypto/rsa/rsa_x931g.c:84:5: 
82.       BN_CTX_start(ctx);
83.   
84. >     r0 = BN_CTX_get(ctx);
85.       r1 = BN_CTX_get(ctx);
86.       r2 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:266:1: start of procedure BN_CTX_get()
  264.   }
  265.   
  266. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  267.   {
  268.       BIGNUM *ret;

crypto/bn/bn_ctx.c:271:9: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                 ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:271:27: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                                   ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:273:9: Taking false branch
  271.       if (ctx->err_stack || ctx->too_many)
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
                 ^
  274.           /*
  275.            * Setting too_many prevents repeated "get" attempts from cluttering

crypto/bn/bn_ctx.c:283:5: 
  281.       }
  282.       /* OK, make sure the returned bignum is "zero" */
  283. >     BN_zero(ret);
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: start of procedure BN_set_word()
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Condition is true
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:523:9: Taking false branch
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:525:5: 
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
    524.           return (0);
    525. >     a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:526:5: 
    524.           return (0);
    525.       a->neg = 0;
    526. >     a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);

crypto/bn/bn_lib.c:527:15: Condition is false
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
                         ^
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:527:5: 
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527. >     a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:529:5: 
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529. >     return (1);
    530.   }
    531.   

crypto/bn/bn_lib.c:530:1: return from a call to BN_set_word
    528.       bn_check_top(a);
    529.       return (1);
    530. > }
    531.   
    532.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/bn/bn_ctx.c:284:5: 
  282.       /* OK, make sure the returned bignum is "zero" */
  283.       BN_zero(ret);
  284. >     ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;

crypto/bn/bn_ctx.c:286:5: 
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286. >     return ret;
  287.   }
  288.   

crypto/bn/bn_ctx.c:287:1: return from a call to BN_CTX_get
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;
  287. > }
  288.   
  289.   /************/

crypto/rsa/rsa_x931g.c:85:5: 
83.   
84.       r0 = BN_CTX_get(ctx);
85. >     r1 = BN_CTX_get(ctx);
86.       r2 = BN_CTX_get(ctx);
87.       r3 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:266:1: start of procedure BN_CTX_get()
  264.   }
  265.   
  266. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  267.   {
  268.       BIGNUM *ret;

crypto/bn/bn_ctx.c:271:9: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                 ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:271:27: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                                   ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:273:9: Taking false branch
  271.       if (ctx->err_stack || ctx->too_many)
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
                 ^
  274.           /*
  275.            * Setting too_many prevents repeated "get" attempts from cluttering

crypto/bn/bn_ctx.c:283:5: 
  281.       }
  282.       /* OK, make sure the returned bignum is "zero" */
  283. >     BN_zero(ret);
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: start of procedure BN_set_word()
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Condition is true
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:523:9: Taking false branch
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:525:5: 
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
    524.           return (0);
    525. >     a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:526:5: 
    524.           return (0);
    525.       a->neg = 0;
    526. >     a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);

crypto/bn/bn_lib.c:527:15: Condition is false
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
                         ^
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:527:5: 
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527. >     a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:529:5: 
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529. >     return (1);
    530.   }
    531.   

crypto/bn/bn_lib.c:530:1: return from a call to BN_set_word
    528.       bn_check_top(a);
    529.       return (1);
    530. > }
    531.   
    532.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/bn/bn_ctx.c:284:5: 
  282.       /* OK, make sure the returned bignum is "zero" */
  283.       BN_zero(ret);
  284. >     ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;

crypto/bn/bn_ctx.c:286:5: 
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286. >     return ret;
  287.   }
  288.   

crypto/bn/bn_ctx.c:287:1: return from a call to BN_CTX_get
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;
  287. > }
  288.   
  289.   /************/

crypto/rsa/rsa_x931g.c:86:5: 
84.       r0 = BN_CTX_get(ctx);
85.       r1 = BN_CTX_get(ctx);
86. >     r2 = BN_CTX_get(ctx);
87.       r3 = BN_CTX_get(ctx);
88.   

crypto/bn/bn_ctx.c:266:1: start of procedure BN_CTX_get()
  264.   }
  265.   
  266. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  267.   {
  268.       BIGNUM *ret;

crypto/bn/bn_ctx.c:271:9: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                 ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:271:27: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                                   ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:273:9: Taking false branch
  271.       if (ctx->err_stack || ctx->too_many)
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
                 ^
  274.           /*
  275.            * Setting too_many prevents repeated "get" attempts from cluttering

crypto/bn/bn_ctx.c:283:5: 
  281.       }
  282.       /* OK, make sure the returned bignum is "zero" */
  283. >     BN_zero(ret);
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: start of procedure BN_set_word()
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Condition is true
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:523:9: Taking false branch
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:525:5: 
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
    524.           return (0);
    525. >     a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:526:5: 
    524.           return (0);
    525.       a->neg = 0;
    526. >     a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);

crypto/bn/bn_lib.c:527:15: Condition is false
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
                         ^
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:527:5: 
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527. >     a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:529:5: 
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529. >     return (1);
    530.   }
    531.   

crypto/bn/bn_lib.c:530:1: return from a call to BN_set_word
    528.       bn_check_top(a);
    529.       return (1);
    530. > }
    531.   
    532.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/bn/bn_ctx.c:284:5: 
  282.       /* OK, make sure the returned bignum is "zero" */
  283.       BN_zero(ret);
  284. >     ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;

crypto/bn/bn_ctx.c:286:5: 
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286. >     return ret;
  287.   }
  288.   

crypto/bn/bn_ctx.c:287:1: return from a call to BN_CTX_get
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;
  287. > }
  288.   
  289.   /************/

crypto/rsa/rsa_x931g.c:87:5: 
85.       r1 = BN_CTX_get(ctx);
86.       r2 = BN_CTX_get(ctx);
87. >     r3 = BN_CTX_get(ctx);
88.   
89.       if (r3 == NULL)

crypto/bn/bn_ctx.c:266:1: start of procedure BN_CTX_get()
  264.   }
  265.   
  266. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
  267.   {
  268.       BIGNUM *ret;

crypto/bn/bn_ctx.c:271:9: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                 ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:271:27: Taking false branch
  269.   
  270.       CTXDBG_ENTRY("BN_CTX_get", ctx);
  271.       if (ctx->err_stack || ctx->too_many)
                                   ^
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {

crypto/bn/bn_ctx.c:273:9: Taking false branch
  271.       if (ctx->err_stack || ctx->too_many)
  272.           return NULL;
  273.       if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
                 ^
  274.           /*
  275.            * Setting too_many prevents repeated "get" attempts from cluttering

crypto/bn/bn_ctx.c:283:5: 
  281.       }
  282.       /* OK, make sure the returned bignum is "zero" */
  283. >     BN_zero(ret);
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: start of procedure BN_set_word()
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Condition is true
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:523:9: Taking false branch
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lib.c:525:5: 
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
    524.           return (0);
    525. >     a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);

crypto/bn/bn_lib.c:526:5: 
    524.           return (0);
    525.       a->neg = 0;
    526. >     a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);

crypto/bn/bn_lib.c:527:15: Condition is false
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527.       a->top = (w ? 1 : 0);
                         ^
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:527:5: 
    525.       a->neg = 0;
    526.       a->d[0] = w;
    527. >     a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529.       return (1);

crypto/bn/bn_lib.c:529:5: 
    527.       a->top = (w ? 1 : 0);
    528.       bn_check_top(a);
    529. >     return (1);
    530.   }
    531.   

crypto/bn/bn_lib.c:530:1: return from a call to BN_set_word
    528.       bn_check_top(a);
    529.       return (1);
    530. > }
    531.   
    532.   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)

crypto/bn/bn_ctx.c:284:5: 
  282.       /* OK, make sure the returned bignum is "zero" */
  283.       BN_zero(ret);
  284. >     ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;

crypto/bn/bn_ctx.c:286:5: 
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);
  286. >     return ret;
  287.   }
  288.   

crypto/bn/bn_ctx.c:287:1: return from a call to BN_CTX_get
  285.       CTXDBG_RET(ctx, ret);
  286.       return ret;
  287. > }
  288.   
  289.   /************/

crypto/rsa/rsa_x931g.c:89:9: Taking false branch
87.       r3 = BN_CTX_get(ctx);
88.   
89.       if (r3 == NULL)
              ^
90.           goto err;
91.       if (!rsa->e) {

crypto/rsa/rsa_x931g.c:91:10: Taking true branch
89.       if (r3 == NULL)
90.           goto err;
91.       if (!rsa->e) {
               ^
92.           rsa->e = BN_dup(e);
93.           if (!rsa->e)

crypto/rsa/rsa_x931g.c:92:9: 
90.           goto err;
91.       if (!rsa->e) {
92. >         rsa->e = BN_dup(e);
93.           if (!rsa->e)
94.               goto err;

crypto/bn/bn_lib.c:400:1: start of procedure BN_dup()
  398.   }
  399.   
  400. > BIGNUM *BN_dup(const BIGNUM *a)
  401.   {
  402.       BIGNUM *t;

crypto/bn/bn_lib.c:404:9: Taking false branch
  402.       BIGNUM *t;
  403.   
  404.       if (a == NULL)
                 ^
  405.           return NULL;
  406.       bn_check_top(a);

crypto/bn/bn_lib.c:408:9: 
  406.       bn_check_top(a);
  407.   
  408. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  409.       if (t == NULL)
  410.           return NULL;

crypto/bn/bn_lib.c:1041:1: start of procedure BN_get_flags()
    1039.   }
    1040.   
    1041. > int BN_get_flags(const BIGNUM *b, int n)
    1042.   {
    1043.       return b->flags & n;

crypto/bn/bn_lib.c:1043:5: 
    1041.   int BN_get_flags(const BIGNUM *b, int n)
    1042.   {
    1043. >     return b->flags & n;
    1044.   }
    1045.   

crypto/bn/bn_lib.c:1044:1: return from a call to BN_get_flags
    1042.   {
    1043.       return b->flags & n;
    1044. > }
    1045.   
    1046.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:408:9: Condition is false
  406.       bn_check_top(a);
  407.   
  408.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
                 ^
  409.       if (t == NULL)
  410.           return NULL;

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)

crypto/bn/bn_lib.c:408:5: 
  406.       bn_check_top(a);
  407.   
  408. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  409.       if (t == NULL)
  410.           return NULL;

crypto/bn/bn_lib.c:409:9: Taking false branch
  407.   
  408.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  409.       if (t == NULL)
                 ^
  410.           return NULL;
  411.       if (!BN_copy(t, a)) {

crypto/bn/bn_lib.c:411:10: Taking false branch
  409.       if (t == NULL)
  410.           return NULL;
  411.       if (!BN_copy(t, a)) {
                  ^
  412.           BN_free(t);
  413.           return NULL;

crypto/bn/bn_lib.c:416:5: 
  414.       }
  415.       bn_check_top(t);
  416. >     return t;
  417.   }
  418.   

crypto/bn/bn_lib.c:417:1: return from a call to BN_dup
  415.       bn_check_top(t);
  416.       return t;
  417. > }
  418.   
  419.   BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)

crypto/rsa/rsa_x931g.c:93:14: Taking false branch
91.       if (!rsa->e) {
92.           rsa->e = BN_dup(e);
93.           if (!rsa->e)
                   ^
94.               goto err;
95.       } else

crypto/rsa/rsa_x931g.c:103:9: Taking true branch
101.        */
102.   
103.       if (Xp && rsa->p == NULL) {
               ^
104.           rsa->p = BN_new();
105.           if (rsa->p == NULL)

crypto/rsa/rsa_x931g.c:103:15: Taking true branch
101.        */
102.   
103.       if (Xp && rsa->p == NULL) {
                     ^
104.           rsa->p = BN_new();
105.           if (rsa->p == NULL)

crypto/rsa/rsa_x931g.c:104:9: 
102.   
103.       if (Xp && rsa->p == NULL) {
104. >         rsa->p = BN_new();
105.           if (rsa->p == NULL)
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)

crypto/rsa/rsa_x931g.c:105:13: Taking false branch
103.       if (Xp && rsa->p == NULL) {
104.           rsa->p = BN_new();
105.           if (rsa->p == NULL)
                   ^
106.               goto err;
107.   

crypto/rsa/rsa_x931g.c:108:14: Skipping BN_X931_derive_prime_ex(): empty list of specs
106.               goto err;
107.   
108.           if (!BN_X931_derive_prime_ex(rsa->p, p1, p2,
                    ^
109.                                        Xp, Xp1, Xp2, e, ctx, cb))
110.               goto err;
