crypto/objects/o_names.c:97: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_zalloc()` at line 85, column 22 is not reachable after line 97, column 18.
Showing all 179 steps of the trace


crypto/objects/o_names.c:64:1: start of procedure OBJ_NAME_new_index()
62.   }
63.   
64. > int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
65.                          int (*cmp_func) (const char *, const char *),
66.                          void (*free_func) (const char *, int, const char *))

crypto/objects/o_names.c:72:9: Taking true branch
70.       NAME_FUNCS *name_funcs;
71.   
72.       if (name_funcs_stack == NULL) {
              ^
73.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
74.           name_funcs_stack = sk_NAME_FUNCS_new_null();

crypto/objects/o_names.c:73:9: 
71.   
72.       if (name_funcs_stack == NULL) {
73. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
74.           name_funcs_stack = sk_NAME_FUNCS_new_null();
75.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:74:9: 
72.       if (name_funcs_stack == NULL) {
73.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
74. >         name_funcs_stack = sk_NAME_FUNCS_new_null();
75.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
76.       }

crypto/objects/o_names.h:4:1: start of procedure sk_NAME_FUNCS_new_null()
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/stack/stack.c:145:1: start of procedure sk_new_null()
    143.   }
    144.   
    145. > _STACK *sk_new_null(void)
    146.   {
    147.       return sk_new((int (*)(const void *, const void *))0);

crypto/stack/stack.c:147:5: 
    145.   _STACK *sk_new_null(void)
    146.   {
    147. >     return sk_new((int (*)(const void *, const void *))0);
    148.   }
    149.   

crypto/stack/stack.c:150:1: start of procedure sk_new()
      148.   }
      149.   
      150. > _STACK *sk_new(int (*c) (const void *, const void *))
      151.   {
      152.       _STACK *ret;

crypto/stack/stack.c:154:9: 
      152.       _STACK *ret;
      153.   
      154. >     if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      155.           goto err;
      156.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/stack/stack.c:154:9: Taking false branch
      152.       _STACK *ret;
      153.   
      154.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
                     ^
      155.           goto err;
      156.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

crypto/stack/stack.c:156:9: 
      154.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      155.           goto err;
      156. >     if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
      157.           goto err;
      158.       ret->comp = c;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/stack/stack.c:156:9: Taking false branch
      154.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      155.           goto err;
      156.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
                     ^
      157.           goto err;
      158.       ret->comp = c;

crypto/stack/stack.c:158:5: 
      156.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
      157.           goto err;
      158. >     ret->comp = c;
      159.       ret->num_alloc = MIN_NODES;
      160.       return (ret);

crypto/stack/stack.c:159:5: 
      157.           goto err;
      158.       ret->comp = c;
      159. >     ret->num_alloc = MIN_NODES;
      160.       return (ret);
      161.   

crypto/stack/stack.c:160:5: 
      158.       ret->comp = c;
      159.       ret->num_alloc = MIN_NODES;
      160. >     return (ret);
      161.   
      162.    err:

crypto/stack/stack.c:165:1: return from a call to sk_new
      163.       OPENSSL_free(ret);
      164.       return (NULL);
      165. > }
      166.   
      167.   int sk_insert(_STACK *st, void *data, int loc)

crypto/stack/stack.c:148:1: return from a call to sk_new_null
    146.   {
    147.       return sk_new((int (*)(const void *, const void *))0);
    148. > }
    149.   
    150.   _STACK *sk_new(int (*c) (const void *, const void *))

crypto/objects/o_names.h:4:1: return from a call to sk_NAME_FUNCS_new_null
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/objects/o_names.c:75:9: 
73.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
74.           name_funcs_stack = sk_NAME_FUNCS_new_null();
75. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
76.       }
77.       if (name_funcs_stack == NULL) {

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:77:9: Taking false branch
75.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
76.       }
77.       if (name_funcs_stack == NULL) {
              ^
78.           /* ERROR */
79.           return (0);

crypto/objects/o_names.c:81:5: 
79.           return (0);
80.       }
81. >     ret = names_type_num;
82.       names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {

crypto/objects/o_names.c:82:5: 
80.       }
81.       ret = names_type_num;
82. >     names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);

crypto/objects/o_names.c:83:10: 
81.       ret = names_type_num;
82.       names_type_num++;
83. >     for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));

crypto/objects/o_names.h:4:1: start of procedure sk_NAME_FUNCS_num()
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/stack/stack.c:317:1: start of procedure sk_num()
    315.   }
    316.   
    317. > int sk_num(const _STACK *st)
    318.   {
    319.       if (st == NULL)

crypto/stack/stack.c:319:9: Taking false branch
    317.   int sk_num(const _STACK *st)
    318.   {
    319.       if (st == NULL)
                   ^
    320.           return -1;
    321.       return st->num;

crypto/stack/stack.c:321:5: 
    319.       if (st == NULL)
    320.           return -1;
    321. >     return st->num;
    322.   }
    323.   

crypto/stack/stack.c:322:1: return from a call to sk_num
    320.           return -1;
    321.       return st->num;
    322. > }
    323.   
    324.   void *sk_value(const _STACK *st, int i)

crypto/objects/o_names.h:4:1: return from a call to sk_NAME_FUNCS_num
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/objects/o_names.c:83:51: Loop condition is true. Entering loop body
81.       ret = names_type_num;
82.       names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
                                                        ^
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));

crypto/objects/o_names.c:84:9: 
82.       names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:85:9: 
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85. >         name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
87.           if (name_funcs == NULL) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/objects/o_names.c:86:9: 
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
87.           if (name_funcs == NULL) {
88.               OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:87:13: Taking false branch
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
87.           if (name_funcs == NULL) {
                  ^
88.               OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE);
89.               return (0);

crypto/objects/o_names.c:91:9: 
89.               return (0);
90.           }
91. >         name_funcs->hash_func = lh_strhash;
92.           name_funcs->cmp_func = OPENSSL_strcmp;
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);

crypto/objects/o_names.c:92:9: 
90.           }
91.           name_funcs->hash_func = lh_strhash;
92. >         name_funcs->cmp_func = OPENSSL_strcmp;
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94.           sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);

crypto/objects/o_names.c:93:9: 
91.           name_funcs->hash_func = lh_strhash;
92.           name_funcs->cmp_func = OPENSSL_strcmp;
93. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94.           sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
95.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:94:9: 
92.           name_funcs->cmp_func = OPENSSL_strcmp;
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94. >         sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
95.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
96.       }

crypto/objects/o_names.h:4:1: start of procedure sk_NAME_FUNCS_push()
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/stack/stack.c:259:1: start of procedure sk_push()
    257.   }
    258.   
    259. > int sk_push(_STACK *st, void *data)
    260.   {
    261.       return (sk_insert(st, data, st->num));

crypto/stack/stack.c:261:5: 
    259.   int sk_push(_STACK *st, void *data)
    260.   {
    261. >     return (sk_insert(st, data, st->num));
    262.   }
    263.   

crypto/stack/stack.c:167:1: start of procedure sk_insert()
      165.   }
      166.   
      167. > int sk_insert(_STACK *st, void *data, int loc)
      168.   {
      169.       char **s;

crypto/stack/stack.c:171:9: Taking false branch
      169.       char **s;
      170.   
      171.       if (st == NULL)
                     ^
      172.           return 0;
      173.       if (st->num_alloc <= st->num + 1) {

crypto/stack/stack.c:173:9: Taking false branch
      171.       if (st == NULL)
      172.           return 0;
      173.       if (st->num_alloc <= st->num + 1) {
                     ^
      174.           s = OPENSSL_realloc((char *)st->data,
      175.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);

crypto/stack/stack.c:181:10: Taking true branch
      179.           st->num_alloc *= 2;
      180.       }
      181.       if ((loc >= (int)st->num) || (loc < 0))
                      ^
      182.           st->data[st->num] = data;
      183.       else {

crypto/stack/stack.c:182:9: 
      180.       }
      181.       if ((loc >= (int)st->num) || (loc < 0))
      182. >         st->data[st->num] = data;
      183.       else {
      184.           memmove(&(st->data[loc + 1]),

crypto/stack/stack.c:188:5: 
      186.           st->data[loc] = data;
      187.       }
      188. >     st->num++;
      189.       st->sorted = 0;
      190.       return (st->num);

crypto/stack/stack.c:189:5: 
      187.       }
      188.       st->num++;
      189. >     st->sorted = 0;
      190.       return (st->num);
      191.   }

crypto/stack/stack.c:190:5: 
      188.       st->num++;
      189.       st->sorted = 0;
      190. >     return (st->num);
      191.   }
      192.   

crypto/stack/stack.c:191:1: return from a call to sk_insert
      189.       st->sorted = 0;
      190.       return (st->num);
      191. > }
      192.   
      193.   void *sk_delete_ptr(_STACK *st, void *p)

crypto/stack/stack.c:262:1: return from a call to sk_push
    260.   {
    261.       return (sk_insert(st, data, st->num));
    262. > }
    263.   
    264.   int sk_unshift(_STACK *st, void *data)

crypto/objects/o_names.h:4:1: return from a call to sk_NAME_FUNCS_push
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/objects/o_names.c:95:9: 
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94.           sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
95. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
96.       }
97.       name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:83:71: 
81.       ret = names_type_num;
82.       names_type_num++;
83. >     for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));

crypto/objects/o_names.c:83:51: Loop condition is true. Entering loop body
81.       ret = names_type_num;
82.       names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
                                                        ^
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));

crypto/objects/o_names.c:84:9: 
82.       names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:85:9: 
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85. >         name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
87.           if (name_funcs == NULL) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/objects/o_names.c:86:9: 
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
87.           if (name_funcs == NULL) {
88.               OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:87:13: Taking false branch
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));
86.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
87.           if (name_funcs == NULL) {
                  ^
88.               OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE);
89.               return (0);

crypto/objects/o_names.c:91:9: 
89.               return (0);
90.           }
91. >         name_funcs->hash_func = lh_strhash;
92.           name_funcs->cmp_func = OPENSSL_strcmp;
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);

crypto/objects/o_names.c:92:9: 
90.           }
91.           name_funcs->hash_func = lh_strhash;
92. >         name_funcs->cmp_func = OPENSSL_strcmp;
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94.           sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);

crypto/objects/o_names.c:93:9: 
91.           name_funcs->hash_func = lh_strhash;
92.           name_funcs->cmp_func = OPENSSL_strcmp;
93. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94.           sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
95.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:94:9: 
92.           name_funcs->cmp_func = OPENSSL_strcmp;
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94. >         sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
95.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
96.       }

crypto/objects/o_names.h:4:1: start of procedure sk_NAME_FUNCS_push()
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/stack/stack.c:259:1: start of procedure sk_push()
    257.   }
    258.   
    259. > int sk_push(_STACK *st, void *data)
    260.   {
    261.       return (sk_insert(st, data, st->num));

crypto/stack/stack.c:261:5: 
    259.   int sk_push(_STACK *st, void *data)
    260.   {
    261. >     return (sk_insert(st, data, st->num));
    262.   }
    263.   

crypto/stack/stack.c:167:1: start of procedure sk_insert()
      165.   }
      166.   
      167. > int sk_insert(_STACK *st, void *data, int loc)
      168.   {
      169.       char **s;

crypto/stack/stack.c:171:9: Taking false branch
      169.       char **s;
      170.   
      171.       if (st == NULL)
                     ^
      172.           return 0;
      173.       if (st->num_alloc <= st->num + 1) {

crypto/stack/stack.c:173:9: Taking false branch
      171.       if (st == NULL)
      172.           return 0;
      173.       if (st->num_alloc <= st->num + 1) {
                     ^
      174.           s = OPENSSL_realloc((char *)st->data,
      175.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);

crypto/stack/stack.c:181:10: Taking true branch
      179.           st->num_alloc *= 2;
      180.       }
      181.       if ((loc >= (int)st->num) || (loc < 0))
                      ^
      182.           st->data[st->num] = data;
      183.       else {

crypto/stack/stack.c:182:9: 
      180.       }
      181.       if ((loc >= (int)st->num) || (loc < 0))
      182. >         st->data[st->num] = data;
      183.       else {
      184.           memmove(&(st->data[loc + 1]),

crypto/stack/stack.c:188:5: 
      186.           st->data[loc] = data;
      187.       }
      188. >     st->num++;
      189.       st->sorted = 0;
      190.       return (st->num);

crypto/stack/stack.c:189:5: 
      187.       }
      188.       st->num++;
      189. >     st->sorted = 0;
      190.       return (st->num);
      191.   }

crypto/stack/stack.c:190:5: 
      188.       st->num++;
      189.       st->sorted = 0;
      190. >     return (st->num);
      191.   }
      192.   

crypto/stack/stack.c:191:1: return from a call to sk_insert
      189.       st->sorted = 0;
      190.       return (st->num);
      191. > }
      192.   
      193.   void *sk_delete_ptr(_STACK *st, void *p)

crypto/stack/stack.c:262:1: return from a call to sk_push
    260.   {
    261.       return (sk_insert(st, data, st->num));
    262. > }
    263.   
    264.   int sk_unshift(_STACK *st, void *data)

crypto/objects/o_names.h:4:1: return from a call to sk_NAME_FUNCS_push
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/objects/o_names.c:95:9: 
93.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
94.           sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
95. >         CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
96.       }
97.       name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);

crypto/mem_dbg.c:206:1: start of procedure CRYPTO_mem_ctrl()
  204.   #endif
  205.   
  206. > int CRYPTO_mem_ctrl(int mode)
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:209:5: 
  207.   {
  208.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  209. >     return mode - mode;
  210.   #else
  211.       int ret = mh_mode;

crypto/mem_dbg.c:275:1: return from a call to CRYPTO_mem_ctrl
  273.       return (ret);
  274.   #endif
  275. > }
  276.   
  277.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/objects/o_names.c:83:71: 
81.       ret = names_type_num;
82.       names_type_num++;
83. >     for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));

crypto/objects/o_names.c:83:51: Loop condition is false. Leaving loop
81.       ret = names_type_num;
82.       names_type_num++;
83.       for (i = sk_NAME_FUNCS_num(name_funcs_stack); i < names_type_num; i++) {
                                                        ^
84.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
85.           name_funcs = OPENSSL_zalloc(sizeof(*name_funcs));

crypto/objects/o_names.c:97:5: 
95.           CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE);
96.       }
97. >     name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret);
98.       if (hash_func != NULL)
99.           name_funcs->hash_func = hash_func;

crypto/objects/o_names.h:4:1: start of procedure sk_NAME_FUNCS_value()
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)

crypto/stack/stack.c:324:1: start of procedure sk_value()
    322.   }
    323.   
    324. > void *sk_value(const _STACK *st, int i)
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))

crypto/stack/stack.c:326:10: Taking false branch
    324.   void *sk_value(const _STACK *st, int i)
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))
                    ^
    327.           return NULL;
    328.       return st->data[i];

crypto/stack/stack.c:326:17: Taking false branch
    324.   void *sk_value(const _STACK *st, int i)
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))
                           ^
    327.           return NULL;
    328.       return st->data[i];

crypto/stack/stack.c:326:28: Taking false branch
    324.   void *sk_value(const _STACK *st, int i)
    325.   {
    326.       if (!st || (i < 0) || (i >= st->num))
                                      ^
    327.           return NULL;
    328.       return st->data[i];

crypto/stack/stack.c:328:5: 
    326.       if (!st || (i < 0) || (i >= st->num))
    327.           return NULL;
    328. >     return st->data[i];
    329.   }
    330.   

crypto/stack/stack.c:329:1: return from a call to sk_value
    327.           return NULL;
    328.       return st->data[i];
    329. > }
    330.   
    331.   void *sk_set(_STACK *st, int i, void *value)

crypto/objects/o_names.h:4:1: return from a call to sk_NAME_FUNCS_value
  2.   
  3.   typedef struct name_funcs_st NAME_FUNCS;
  4. > DEFINE_STACK_OF(NAME_FUNCS)
