[dovecot-cvs] dovecot/src/lib-auth auth-client.c, 1.5, 1.6 auth-server-connection.c, 1.7, 1.8 auth-server-request.c, 1.13, 1.14

cras at dovecot.org cras at dovecot.org
Fri Oct 8 20:51:50 EEST 2004


Update of /var/lib/cvs/dovecot/src/lib-auth
In directory talvi:/tmp/cvs-serv10130/lib-auth

Modified Files:
	auth-client.c auth-server-connection.c auth-server-request.c 
Log Message:
Buffer API change: we no longer support limited sized buffers where
writes past limit wouldn't kill the process. They weren't used hardly
anywhere, they could have hidden bugs and the code for handling them was too
complex.

This also changed base64 and hex-binary APIs.



Index: auth-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-client.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- auth-client.c	2 Jul 2004 22:03:37 -0000	1.5
+++ auth-client.c	8 Oct 2004 17:51:48 -0000	1.6
@@ -25,8 +25,7 @@
 	client = i_new(struct auth_client, 1);
 	client->pid = client_pid;
 	client->socket_paths = i_strdup(socket_paths);
-	client->available_auth_mechs =
-		buffer_create_dynamic(default_pool, 128, (size_t)-1);
+	client->available_auth_mechs = buffer_create_dynamic(default_pool, 128);
 
 	client->ext_input_add = add_func;
 	client->ext_input_remove = remove_func;

Index: auth-server-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-server-connection.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- auth-server-connection.c	15 Aug 2004 03:40:31 -0000	1.7
+++ auth-server-connection.c	8 Oct 2004 17:51:48 -0000	1.8
@@ -58,7 +58,7 @@
 	}
 
 	buf = buffer_create_dynamic(conn->pool, sizeof(mech_desc) *
-				    handshake->mech_count, (size_t)-1);
+				    handshake->mech_count);
 	for (i = 0; i < handshake->mech_count; i++) {
 		memcpy(&handshake_mech_desc,
 		       data + sizeof(handshake_mech_desc) * i,

Index: auth-server-request.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-server-request.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- auth-server-request.c	15 Aug 2004 03:40:31 -0000	1.13
+++ auth-server-request.c	8 Oct 2004 17:51:48 -0000	1.14
@@ -86,7 +86,7 @@
 		auth_request.ip_family = request->local_ip.family;
 
 	t_push();
-	buf = buffer_create_dynamic(pool_datastack_create(), 256, (size_t)-1);
+	buf = buffer_create_dynamic(pool_datastack_create(), 256);
 	buffer_set_used_size(buf, sizeof(auth_request));
 
 	if (auth_request.ip_family != 0) {



More information about the dovecot-cvs mailing list