[dovecot-cvs] dovecot/src/auth auth-worker-client.c,1.23,1.24
cras at dovecot.org
cras at dovecot.org
Fri Apr 14 11:50:47 EEST 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv9154
Modified Files:
auth-worker-client.c
Log Message:
Don't crash if no extra arguments were given to auth worker request.
Index: auth-worker-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-client.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- auth-worker-client.c 22 Feb 2006 13:58:43 -0000 1.23
+++ auth-worker-client.c 14 Apr 2006 08:50:45 -0000 1.24
@@ -54,18 +54,20 @@
auth_request->context = client;
auth_request->id = id;
- t_push();
- for (tmp = t_strsplit(args, "\t"); *tmp != NULL; tmp++) {
- value = strchr(*tmp, '=');
- if (value == NULL)
- continue;
+ if (args != NULL) {
+ t_push();
+ for (tmp = t_strsplit(args, "\t"); *tmp != NULL; tmp++) {
+ value = strchr(*tmp, '=');
+ if (value == NULL)
+ continue;
- key = t_strdup_until(*tmp, value);
- value++;
+ key = t_strdup_until(*tmp, value);
+ value++;
- (void)auth_request_import(auth_request, key, value);
+ (void)auth_request_import(auth_request, key, value);
+ }
+ t_pop();
}
- t_pop();
return auth_request;
}
More information about the dovecot-cvs
mailing list