Bug#400955: base 64 decode problems
Michele Baldessari
michele-lists at pupazzo.org
Tue Dec 5 10:02:01 CET 2006
I took a better look at this, and here's an updated
0015_saslutil_decode64_fix:
if (inlen > 0) {
/* check for trailing CRLF */
if (inlen == 2 && in[0] != '\r' && in[1] != '\n') {
if (saw_equal) {
return SASL_BADPROT;
} else {
return (SASL_CONTINUE);
}
} else if (inlen == 1 && in[0] != '\r' && in[0] != '\n') {
if (saw_equal) {
return SASL_BADPROT;
} else {
return (SASL_CONTINUE);
}
}
}
The previous version had "inlen != 2" test which doesn't really make
much sense since we are checking the two next characters, so we need to
guarantee their presence. I also added a second check for trailing of
single '\r' and '\n' only, which was why it was barfing on my testcase
with sasl-simple-client.
hth,
Michele
More information about the Pkg-cyrus-sasl2-debian-devel
mailing list