diff options
| -rw-r--r-- | maildrop/dovecotauth.c | 13 | ||||
| -rw-r--r-- | pcp/pcpdir.c | 9 | ||||
| -rw-r--r-- | sqwebmail/pcp.c | 2 | ||||
| -rw-r--r-- | tcpd/libcouriergnutls.c | 10 | 
4 files changed, 13 insertions, 21 deletions
| diff --git a/maildrop/dovecotauth.c b/maildrop/dovecotauth.c index e5ead09..b9e3a37 100644 --- a/maildrop/dovecotauth.c +++ b/maildrop/dovecotauth.c @@ -11,7 +11,7 @@  **  - s_connect() function  **  - opensock() function with modification to accept socket address  **  - writeauth() function -**  - readline() function with related support functions (with modification  +**  - readline() function with related support functions (with modification  **    to time-out after TIMEOUT_READ seconds)  */ @@ -29,11 +29,9 @@  #include	<sys/un.h>  #include	<sys/select.h> -static const char rcsid[]="$Id$"; -  static int TIMEOUT_SOCK=10,  	TIMEOUT_WRITE=10, -	TIMEOUT_READ=30;  +	TIMEOUT_READ=30;  static int s_connect(int sockfd,  		     const struct sockaddr *addr, @@ -122,8 +120,9 @@ static int opensock(const char *addr)  	int	s=socket(PF_UNIX, SOCK_STREAM, 0);  	struct  sockaddr_un skun; +	memset(&skun, 0, sizeof(skun));  	skun.sun_family=AF_UNIX; -	strncpy(skun.sun_path, addr, sizeof(skun.sun_path)); +	strncpy(skun.sun_path, addr, sizeof(skun.sun_path)-1);  	if (s < 0)  	{ @@ -402,10 +401,10 @@ int _dovecotauth_getuserinfo(int wrfd, int rdfd, const char *user,  	/*  	** Try to be helpful in case that user tries to connect to the wrong auth socket. -	** There's a slight chance that this won't execute in case that the previously  +	** There's a slight chance that this won't execute in case that the previously  	** returned line ends exactly at the buffer end, but we won't handle that case,  	** since this is just a hint to the user, and not really neccessary. -	** Normally, if user tries to communicate with wrong auth socket,  +	** Normally, if user tries to communicate with wrong auth socket,  	** we would simply time-out, while waiting for information.  	*/  	if (eg.buf_left > 0 && readline(rdfd, &eg, linebuf, DOVECOTAUTH_LINEBUFSIZE) == 0) diff --git a/pcp/pcpdir.c b/pcp/pcpdir.c index 3bfe995..ba8aad7 100644 --- a/pcp/pcpdir.c +++ b/pcp/pcpdir.c @@ -231,6 +231,7 @@ static void pcp_close_dir(struct PCPdir *pd)  static void mkunique(struct PCPdir *pd)  {  	struct timeval tv; +	char b[sizeof(pd->hostname_buf)];  	gettimeofday(&tv, NULL); @@ -240,7 +241,9 @@ static void mkunique(struct PCPdir *pd)  		(unsigned long)getpid(),  		++pd->uniq_cnt); -	strncat(pd->unique_filename_buf, pd->hostname_buf, +	strcpy(b, pd->hostname_buf); + +	strncat(pd->unique_filename_buf, b,  		sizeof(pd->unique_filename_buf)-1  		-strlen(pd->unique_filename_buf));  } @@ -779,7 +782,7 @@ static void destroyeventid(struct PCPdir *pd, struct PCPdir_new_eventid *p)  	free(p->eventid.eventid);  	free(p); -}		 +}  static int saveevent(struct PCPdir *pd, struct PCPdir_new_eventid *ne,  		     struct PCP_save_event *si) @@ -1448,7 +1451,7 @@ static int docommitevent(struct PCPdir *pd, struct PCPdir_new_eventid *ae,  					/* Booked event disappeared */  				} -				if (rc == 0 &&  +				if (rc == 0 &&  				    (fflush(nfp) < 0 || ferror(nfp)))  					rc= -1; diff --git a/sqwebmail/pcp.c b/sqwebmail/pcp.c index ce665e9..c2a99f6 100644 --- a/sqwebmail/pcp.c +++ b/sqwebmail/pcp.c @@ -1192,7 +1192,7 @@ void sqpcp_summary()  		char date[256];  		char date2[256];  		struct tm *tm; -		char yyyymmdd[9]; +		char yyyymmdd[100];  		char time1[128];  		char time2[128]; diff --git a/tcpd/libcouriergnutls.c b/tcpd/libcouriergnutls.c index c4989c8..4964d8c 100644 --- a/tcpd/libcouriergnutls.c +++ b/tcpd/libcouriergnutls.c @@ -1756,8 +1756,6 @@ static void dump_cipher_name(gnutls_session_t session,  		(*dump_func)(cipher_name, -1, dump_arg);  	else  	{ -		gnutls_compression_method_t comp; -  		(*dump_func)(gnutls_kx_get_name(kx_algo), -1, dump_arg);  		(*dump_func)("-", 1, dump_arg); @@ -1768,14 +1766,6 @@ static void dump_cipher_name(gnutls_session_t session,  		(*dump_func)(gnutls_cipher_get_name(cipher_algo), -1,  			     dump_arg); -		if ((comp=gnutls_compression_get(session)) -		    != GNUTLS_COMP_NULL) -		{ -			(*dump_func)("/", 1, dump_arg); -			(*dump_func)(gnutls_compression_get_name(comp), -				     -1, dump_arg); -		} -  		(*dump_func)("-", 1, dump_arg);  		(*dump_func)(gnutls_mac_get_name(gnutls_mac_get(session)),  			     -1, dump_arg); | 
