crypto/ui/ui_lib.c:624: error: NULL_DEREFERENCE
  pointer `ui_method` last assigned on line 620 could be null and is dereferenced at line 624, column 2.
Showing all 48 steps of the trace


crypto/ui/ui_lib.c:618:1: start of procedure UI_create_method()
616.   
617.   
618. > UI_METHOD *UI_create_method(char *name)
619.   	{
620.   	UI_METHOD *ui_method = (UI_METHOD *)OPENSSL_malloc(sizeof(UI_METHOD));

crypto/ui/ui_lib.c:620:2: 
618.   UI_METHOD *UI_create_method(char *name)
619.   	{
620. > 	UI_METHOD *ui_method = (UI_METHOD *)OPENSSL_malloc(sizeof(UI_METHOD));
621.   
622.   	if (ui_method)

crypto/mem.c:291:1: start of procedure CRYPTO_malloc()
  289.   	}
  290.   
  291. > void *CRYPTO_malloc(int num, const char *file, int line)
  292.   	{
  293.   	void *ret = NULL;

crypto/mem.c:293:2: 
  291.   void *CRYPTO_malloc(int num, const char *file, int line)
  292.   	{
  293. > 	void *ret = NULL;
  294.   	extern unsigned char cleanse_ctr;
  295.   

crypto/mem.c:296:6: Taking false branch
  294.   	extern unsigned char cleanse_ctr;
  295.   
  296.   	if (num < 0) return NULL;
              ^
  297.   
  298.   	allow_customize = 0;

crypto/mem.c:298:2: 
  296.   	if (num < 0) return NULL;
  297.   
  298. > 	allow_customize = 0;
  299.   	if (malloc_debug_func != NULL)
  300.   		{

crypto/mem.c:299:6: Taking true branch
  297.   
  298.   	allow_customize = 0;
  299.   	if (malloc_debug_func != NULL)
              ^
  300.   		{
  301.   		allow_customize_debug = 0;

crypto/mem.c:301:3: 
  299.   	if (malloc_debug_func != NULL)
  300.   		{
  301. > 		allow_customize_debug = 0;
  302.   		malloc_debug_func(NULL, num, file, line, 0);
  303.   		}

crypto/mem.c:302:3: Skipping __function_pointer__(): unresolved function pointer
  300.   		{
  301.   		allow_customize_debug = 0;
  302.   		malloc_debug_func(NULL, num, file, line, 0);
           ^
  303.   		}
  304.   	ret = malloc_ex_func(num,file,line);

crypto/mem.c:304:2: Skipping __function_pointer__(): unresolved function pointer
  302.   		malloc_debug_func(NULL, num, file, line, 0);
  303.   		}
  304.   	ret = malloc_ex_func(num,file,line);
          ^
  305.   #ifdef LEVITTE_DEBUG_MEM
  306.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);

crypto/mem.c:308:6: Taking true branch
  306.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);
  307.   #endif
  308.   	if (malloc_debug_func != NULL)
              ^
  309.   		malloc_debug_func(ret, num, file, line, 1);
  310.   

crypto/mem.c:309:3: Skipping __function_pointer__(): unresolved function pointer
  307.   #endif
  308.   	if (malloc_debug_func != NULL)
  309.   		malloc_debug_func(ret, num, file, line, 1);
           ^
  310.   
  311.           /* Create a dependency on the value of 'cleanse_ctr' so our memory

crypto/mem.c:314:12: Taking false branch
  312.            * sanitisation function can't be optimised out. NB: We only do
  313.            * this for >2Kb so the overhead doesn't bother us. */
  314.           if(ret && (num > 2048))
                    ^
  315.                   ((unsigned char *)ret)[0] = cleanse_ctr;
  316.   

crypto/mem.c:317:2: 
  315.                   ((unsigned char *)ret)[0] = cleanse_ctr;
  316.   
  317. > 	return ret;
  318.   	}
  319.   

crypto/mem.c:318:2: return from a call to CRYPTO_malloc
  316.   
  317.   	return ret;
  318.   	}
          ^
  319.   
  320.   void *CRYPTO_realloc(void *str, int num, const char *file, int line)

crypto/ui/ui_lib.c:622:6: Taking false branch
620.   	UI_METHOD *ui_method = (UI_METHOD *)OPENSSL_malloc(sizeof(UI_METHOD));
621.   
622.   	if (ui_method)
            ^
623.   		memset(ui_method, 0, sizeof(*ui_method));
624.   	ui_method->name = BUF_strdup(name);

crypto/ui/ui_lib.c:624:2: 
622.   	if (ui_method)
623.   		memset(ui_method, 0, sizeof(*ui_method));
624. > 	ui_method->name = BUF_strdup(name);
625.   	return ui_method;
626.   	}

crypto/buffer/buffer.c:165:1: start of procedure BUF_strdup()
  163.   	}
  164.   
  165. > char *BUF_strdup(const char *str)
  166.   	{
  167.   	char *ret;

crypto/buffer/buffer.c:170:6: Taking false branch
  168.   	int n;
  169.   
  170.   	if (str == NULL) return(NULL);
              ^
  171.   
  172.   	n=strlen(str);

crypto/buffer/buffer.c:172:2: 
  170.   	if (str == NULL) return(NULL);
  171.   
  172. > 	n=strlen(str);
  173.   	ret=OPENSSL_malloc(n+1);
  174.   	if (ret == NULL) 

crypto/buffer/buffer.c:173:2: 
  171.   
  172.   	n=strlen(str);
  173. > 	ret=OPENSSL_malloc(n+1);
  174.   	if (ret == NULL) 
  175.   		{

crypto/mem.c:291:1: start of procedure CRYPTO_malloc()
    289.   	}
    290.   
    291. > void *CRYPTO_malloc(int num, const char *file, int line)
    292.   	{
    293.   	void *ret = NULL;

crypto/mem.c:293:2: 
    291.   void *CRYPTO_malloc(int num, const char *file, int line)
    292.   	{
    293. > 	void *ret = NULL;
    294.   	extern unsigned char cleanse_ctr;
    295.   

crypto/mem.c:296:6: Taking false branch
    294.   	extern unsigned char cleanse_ctr;
    295.   
    296.   	if (num < 0) return NULL;
                ^
    297.   
    298.   	allow_customize = 0;

crypto/mem.c:298:2: 
    296.   	if (num < 0) return NULL;
    297.   
    298. > 	allow_customize = 0;
    299.   	if (malloc_debug_func != NULL)
    300.   		{

crypto/mem.c:299:6: Taking true branch
    297.   
    298.   	allow_customize = 0;
    299.   	if (malloc_debug_func != NULL)
                ^
    300.   		{
    301.   		allow_customize_debug = 0;

crypto/mem.c:301:3: 
    299.   	if (malloc_debug_func != NULL)
    300.   		{
    301. > 		allow_customize_debug = 0;
    302.   		malloc_debug_func(NULL, num, file, line, 0);
    303.   		}

crypto/mem.c:302:3: Skipping __function_pointer__(): unresolved function pointer
    300.   		{
    301.   		allow_customize_debug = 0;
    302.   		malloc_debug_func(NULL, num, file, line, 0);
             ^
    303.   		}
    304.   	ret = malloc_ex_func(num,file,line);

crypto/mem.c:304:2: Skipping __function_pointer__(): unresolved function pointer
    302.   		malloc_debug_func(NULL, num, file, line, 0);
    303.   		}
    304.   	ret = malloc_ex_func(num,file,line);
            ^
    305.   #ifdef LEVITTE_DEBUG_MEM
    306.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);

crypto/mem.c:308:6: Taking true branch
    306.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);
    307.   #endif
    308.   	if (malloc_debug_func != NULL)
                ^
    309.   		malloc_debug_func(ret, num, file, line, 1);
    310.   

crypto/mem.c:309:3: Skipping __function_pointer__(): unresolved function pointer
    307.   #endif
    308.   	if (malloc_debug_func != NULL)
    309.   		malloc_debug_func(ret, num, file, line, 1);
             ^
    310.   
    311.           /* Create a dependency on the value of 'cleanse_ctr' so our memory

crypto/mem.c:314:12: Taking false branch
    312.            * sanitisation function can't be optimised out. NB: We only do
    313.            * this for >2Kb so the overhead doesn't bother us. */
    314.           if(ret && (num > 2048))
                      ^
    315.                   ((unsigned char *)ret)[0] = cleanse_ctr;
    316.   

crypto/mem.c:317:2: 
    315.                   ((unsigned char *)ret)[0] = cleanse_ctr;
    316.   
    317. > 	return ret;
    318.   	}
    319.   

crypto/mem.c:318:2: return from a call to CRYPTO_malloc
    316.   
    317.   	return ret;
    318.   	}
            ^
    319.   
    320.   void *CRYPTO_realloc(void *str, int num, const char *file, int line)

crypto/buffer/buffer.c:174:6: Taking true branch
  172.   	n=strlen(str);
  173.   	ret=OPENSSL_malloc(n+1);
  174.   	if (ret == NULL) 
              ^
  175.   		{
  176.   		BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE);

crypto/buffer/buffer.c:176:3: 
  174.   	if (ret == NULL) 
  175.   		{
  176. > 		BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE);
  177.   		return(NULL);
  178.   		}

crypto/err/err.c:619:1: start of procedure ERR_put_error()
    617.   /********************************************************/
    618.   
    619. > void ERR_put_error(int lib, int func, int reason, const char *file,
    620.   	     int line)
    621.   	{

crypto/err/err.c:643:2: Skipping ERR_get_state(): empty list of specs
    641.   	}
    642.   #endif
    643.   	es=ERR_get_state();
            ^
    644.   
    645.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:645:2: 
    643.   	es=ERR_get_state();
    644.   
    645. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
    646.   	if (es->top == es->bottom)
    647.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:646:6: Taking false branch
    644.   
    645.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
    646.   	if (es->top == es->bottom)
                ^
    647.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    648.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:648:2: 
    646.   	if (es->top == es->bottom)
    647.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    648. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    649.   	es->err_file[es->top]=file;
    650.   	es->err_line[es->top]=line;

crypto/err/err.c:649:2: 
    647.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    648.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    649. > 	es->err_file[es->top]=file;
    650.   	es->err_line[es->top]=line;
    651.   	err_clear_data(es,es->top);

crypto/err/err.c:650:2: 
    648.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    649.   	es->err_file[es->top]=file;
    650. > 	es->err_line[es->top]=line;
    651.   	err_clear_data(es,es->top);
    652.   	}

crypto/err/err.c:651:2: Taking true branch
    649.   	es->err_file[es->top]=file;
    650.   	es->err_line[es->top]=line;
    651.   	err_clear_data(es,es->top);
            ^
    652.   	}
    653.   

crypto/err/err.c:651:2: Taking false branch
    649.   	es->err_file[es->top]=file;
    650.   	es->err_line[es->top]=line;
    651.   	err_clear_data(es,es->top);
            ^
    652.   	}
    653.   

crypto/err/err.c:652:2: return from a call to ERR_put_error
    650.   	es->err_line[es->top]=line;
    651.   	err_clear_data(es,es->top);
    652.   	}
            ^
    653.   
    654.   void ERR_clear_error(void)

crypto/buffer/buffer.c:177:3: 
  175.   		{
  176.   		BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE);
  177. > 		return(NULL);
  178.   		}
  179.   	memcpy(ret,str,n+1);

crypto/buffer/buffer.c:181:2: return from a call to BUF_strdup
  179.   	memcpy(ret,str,n+1);
  180.   	return(ret);
  181.   	}
          ^
  182.   
  183.   size_t BUF_strlcpy(char *dst, const char *src, size_t size)
