apps/s_server.c:1022: error: NULL_DEREFERENCE
  pointer `con` last assigned on line 763 could be null and is dereferenced by call to `SSL_set_shutdown()` at line 1022, column 2.
Showing all 20 steps of the trace


apps/s_server.c:756:1: start of procedure sv_body()
754.   	}
755.   
756. > static int sv_body(char *hostname, int s, unsigned char *context)
757.   	{
758.   	char *buf=NULL;

apps/s_server.c:758:2: 
756.   static int sv_body(char *hostname, int s, unsigned char *context)
757.   	{
758. > 	char *buf=NULL;
759.   	fd_set readfds;
760.   	int ret=1,width;

apps/s_server.c:760:2: 
758.   	char *buf=NULL;
759.   	fd_set readfds;
760. > 	int ret=1,width;
761.   	int k,i;
762.   	unsigned long l;

apps/s_server.c:763:2: 
761.   	int k,i;
762.   	unsigned long l;
763. > 	SSL *con=NULL;
764.   	BIO *sbio;
765.   #ifdef WINDOWS

apps/s_server.c:769:6: 
767.   #endif
768.   
769. > 	if ((buf=Malloc(bufsize)) == NULL)
770.   		{
771.   		BIO_printf(bio_err,"out of memory\n");

crypto/mem.c:194:1: start of procedure CRYPTO_malloc()
  192.   	}
  193.   
  194. > void *CRYPTO_malloc(int num, const char *file, int line)
  195.   	{
  196.   	char *ret = NULL;

crypto/mem.c:196:2: 
  194.   void *CRYPTO_malloc(int num, const char *file, int line)
  195.   	{
  196. > 	char *ret = NULL;
  197.   
  198.   	allow_customize = 0;

crypto/mem.c:198:2: 
  196.   	char *ret = NULL;
  197.   
  198. > 	allow_customize = 0;
  199.   	if (malloc_debug_func != NULL)
  200.   		{

crypto/mem.c:199:6: Taking false branch
  197.   
  198.   	allow_customize = 0;
  199.   	if (malloc_debug_func != NULL)
              ^
  200.   		{
  201.   		allow_customize_debug = 0;

crypto/mem.c:204:2: Skipping __function_pointer__(): unresolved function pointer
  202.   		malloc_debug_func(NULL, num, file, line, 0);
  203.   		}
  204.   	ret = malloc_func(num);
          ^
  205.   #ifdef LEVITTE_DEBUG
  206.   	fprintf(stderr, "LEVITTE_DEBUG:         > 0x%p (%d)\n", ret, num);

crypto/mem.c:208:6: Taking false branch
  206.   	fprintf(stderr, "LEVITTE_DEBUG:         > 0x%p (%d)\n", ret, num);
  207.   #endif
  208.   	if (malloc_debug_func != NULL)
              ^
  209.   		malloc_debug_func(ret, num, file, line, 1);
  210.   

crypto/mem.c:211:2: 
  209.   		malloc_debug_func(ret, num, file, line, 1);
  210.   
  211. > 	return ret;
  212.   	}
  213.   

crypto/mem.c:212:2: return from a call to CRYPTO_malloc
  210.   
  211.   	return ret;
  212.   	}
          ^
  213.   
  214.   void *CRYPTO_realloc(void *str, int num, const char *file, int line)

apps/s_server.c:769:6: Taking true branch
767.   #endif
768.   
769.   	if ((buf=Malloc(bufsize)) == NULL)
            ^
770.   		{
771.   		BIO_printf(bio_err,"out of memory\n");

apps/s_server.c:771:3: Skipping BIO_printf(): empty list of specs
769.   	if ((buf=Malloc(bufsize)) == NULL)
770.   		{
771.   		BIO_printf(bio_err,"out of memory\n");
         ^
772.   		goto err;
773.   		}

apps/s_server.c:1019:1: 
1017.   			}
1018.   		}
1019. > err:
1020.   	BIO_printf(bio_s_out,"shutting down SSL\n");
1021.   #if 1

apps/s_server.c:1020:2: Skipping BIO_printf(): empty list of specs
1018.   		}
1019.   err:
1020.   	BIO_printf(bio_s_out,"shutting down SSL\n");
         ^
1021.   #if 1
1022.   	SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);

apps/s_server.c:1022:2: 
1020.   	BIO_printf(bio_s_out,"shutting down SSL\n");
1021.   #if 1
1022. > 	SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
1023.   #else
1024.   	SSL_shutdown(con);

ssl/ssl_lib.c:1883:1: start of procedure SSL_set_shutdown()
  1881.   	}
  1882.   
  1883. > void SSL_set_shutdown(SSL *s,int mode)
  1884.   	{
  1885.   	s->shutdown=mode;

ssl/ssl_lib.c:1885:2: 
  1883.   void SSL_set_shutdown(SSL *s,int mode)
  1884.   	{
  1885. > 	s->shutdown=mode;
  1886.   	}
  1887.   
