List Info

Thread: OpenSSL: openssl/apps/ s_client.c s_server.c




OpenSSL: openssl/apps/ s_client.c s_server.c
user name
2006-03-18 14:24:02
  OpenSSL CVS Repository
  http://cvs.openssl.org/
 
____________________________________________________________
________________

  Server: cvs.openssl.org                  Name:   Nils
Larsch
  Root:   /v/openssl/cvs                   Email:  nilsopenssl.org
  Module: openssl                          Date:  
18-Mar-2006 15:24:02
  Branch: HEAD                             Handle:
2006031814240200

  Modified files:
    openssl/apps            s_client.c s_server.c

  Log:
    check if con != NULL before using it

  Summary:
    Revision    Changes     Path
    1.93        +6  -2      openssl/apps/s_client.c
    1.112       +7  -4      openssl/apps/s_server.c
 
____________________________________________________________
________________

  patch -p0 <<' .'
  Index: openssl/apps/s_client.c
 
============================================================
================
  $ cvs diff -u -r1.92 -r1.93 s_client.c
  --- openssl/apps/s_client.c	15 Mar 2006 17:45:40
-0000	1.92
  +++ openssl/apps/s_client.c	18 Mar 2006 14:24:02
-0000	1.93
   -1237,8 +1237,12 
   	SHUTDOWN(SSL_get_fd(con));
   	ret=0;
   end:
  -	if(prexit) print_stuff(bio_c_out,con,1);
  -	if (con != NULL) SSL_free(con);
  +	if (con != NULL)
  +		{
  +		if (prexit != 0)
  +			print_stuff(bio_c_out,con,1);
  +		SSL_free(con);
  +		}
   	if (ctx != NULL) SSL_CTX_free(ctx);
   	if (cert)
   		X509_free(cert);
   .
  patch -p0 <<' .'
  Index: openssl/apps/s_server.c
 
============================================================
================
  $ cvs diff -u -r1.111 -r1.112 s_server.c
  --- openssl/apps/s_server.c	11 Mar 2006 12:18:10
-0000	1.111
  +++ openssl/apps/s_server.c	18 Mar 2006 14:24:02
-0000	1.112
   -1813,13 +1813,16 
   			}
   		}
   err:
  -	BIO_printf(bio_s_out,"shutting down
SSL\n");
  +	if (con != NULL)
  +		{
  +		BIO_printf(bio_s_out,"shutting down
SSL\n");
   #if 1
 
-	SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDO
WN);
 
+		SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTD
OWN);
   #else
  -	SSL_shutdown(con);
  +		SSL_shutdown(con);
   #endif
  -	if (con != NULL) SSL_free(con);
  +		SSL_free(con);
  +		}
   	BIO_printf(bio_s_out,"CONNECTION
CLOSED\n");
   	if (buf != NULL)
   		{
   .
____________________________________________________________
__________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                    
openssl-cvsopenssl.org
Automated List Manager                          
majordomoopenssl.org
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )