[dovecot-cvs] dovecot/src/auth db-ldap.c, 1.55, 1.56 mech-plain.c, 1.37, 1.38
tss at dovecot.org
tss at dovecot.org
Sat Nov 18 13:41:41 UTC 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv24458/auth
Modified Files:
db-ldap.c mech-plain.c
Log Message:
Cleanup: Don't put string literals into non-const pointers.
Index: db-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-ldap.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- db-ldap.c 12 Nov 2006 23:10:03 -0000 1.55
+++ db-ldap.c 18 Nov 2006 13:41:39 -0000 1.56
@@ -598,10 +598,8 @@
value = p_strdup(conn->pool, p + 1);
}
- if (skip_attr != NULL && strcmp(skip_attr, value) == 0)
- name = "";
-
- if (*name != '\0') {
+ if (*name != '\0' &&
+ (skip_attr == NULL || strcmp(skip_attr, value) != 0)) {
hash_insert(attr_map, name, value);
(*attr_names_r)[j++] = name;
}
Index: mech-plain.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/mech-plain.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- mech-plain.c 8 Nov 2006 20:22:08 -0000 1.37
+++ mech-plain.c 18 Nov 2006 13:41:39 -0000 1.38
@@ -33,7 +33,7 @@
/* authorization ID \0 authentication ID \0 pass.
we'll ignore authorization ID for now. */
authid = (const char *) data;
- authenid = NULL; pass = "";
+ authenid = NULL; pass = NULL;
count = 0;
for (i = 0; i < data_size; i++) {
@@ -70,7 +70,8 @@
}
/* make sure it's cleared */
- safe_memset(pass, 0, strlen(pass));
+ if (pass != NULL)
+ safe_memset(pass, 0, strlen(pass));
}
static struct auth_request *mech_plain_auth_new(void)
More information about the dovecot-cvs
mailing list