[dovecot-cvs] dovecot/src/login client-authenticate.c,1.25,1.26 ssl-proxy-gnutls.c,1.2,1.3

cras at procontrol.fi cras at procontrol.fi
Sat Jan 4 19:26:32 EET 2003


Update of /home/cvs/dovecot/src/login
In directory danu:/tmp/cvs-serv386/login

Modified Files:
	client-authenticate.c ssl-proxy-gnutls.c 
Log Message:
Use unsigned char* when accessing non-NUL terminating strings. Compiler
warnings would then notify about accidentally passing them to functions which
require them NUL-terminated. Changed a few functions to use void* to avoid
unneeded casting.



Index: client-authenticate.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/client-authenticate.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- client-authenticate.c	21 Dec 2002 22:02:58 -0000	1.25
+++ client-authenticate.c	4 Jan 2003 17:26:30 -0000	1.26
@@ -251,7 +251,8 @@
 	linelen = strlen(line);
 	buf = buffer_create_static_hard(data_stack_pool, linelen);
 
-	if (base64_decode(line, linelen, NULL, buf) <= 0) {
+	if (base64_decode((const unsigned char *) line, linelen,
+			  NULL, buf) <= 0) {
 		/* failed */
 		client_auth_abort(client, "NO Invalid base64 data");
 	} else if (client->auth_request == NULL) {

Index: ssl-proxy-gnutls.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/ssl-proxy-gnutls.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ssl-proxy-gnutls.c	18 Dec 2002 15:15:42 -0000	1.2
+++ ssl-proxy-gnutls.c	4 Jan 2003 17:26:30 -0000	1.3
@@ -458,7 +458,7 @@
 void ssl_proxy_init(void)
 {
 	const char *certfile, *keyfile, *paramfile;
-	char buf[4];
+	unsigned char buf[4];
 	int ret;
 
 	certfile = getenv("SSL_CERT_FILE");




More information about the dovecot-cvs mailing list