dovecot-1.2: gssapi: Apparently all usernames end with NUL. Allo...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 28 23:50:28 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/a37fa30b0072
changeset: 9347:a37fa30b0072
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 28 16:50:20 2009 -0400
description:
gssapi: Apparently all usernames end with NUL. Allow it.
diffstat:
1 file changed, 4 insertions(+)
src/auth/mech-gssapi.c | 4 ++++
diffs (14 lines):
diff -r e0cee10e0f41 -r a37fa30b0072 src/auth/mech-gssapi.c
--- a/src/auth/mech-gssapi.c Fri Aug 28 15:24:57 2009 -0400
+++ b/src/auth/mech-gssapi.c Fri Aug 28 16:50:20 2009 -0400
@@ -217,6 +217,10 @@ static bool data_has_nuls(const void *da
{
const unsigned char *c = data;
unsigned int i;
+
+ /* apparently all names end with NUL? */
+ if (len > 0 && c[len-1] == '\0')
+ len--;
for (i = 0; i < len; i++) {
if (c[i] == '\0')
More information about the dovecot-cvs
mailing list