[Pkg-cyrus-sasl2-commits] r170 - in /cyrus-sasl-2.1/trunk/debian:
changelog patches/0015_saslutil_decode64_fix.dpatch
fabbe at users.alioth.debian.org
fabbe at users.alioth.debian.org
Tue Dec 5 09:56:16 CET 2006
Author: fabbe
Date: Tue Dec 5 09:56:15 2006
New Revision: 170
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/?sc=1&rev=170
Log:
Accept trailing CR and LF in sasl_decode64, in addition to CRLF.
Modified:
cyrus-sasl-2.1/trunk/debian/changelog
cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch
Modified: cyrus-sasl-2.1/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/changelog?rev=170&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/changelog (original)
+++ cyrus-sasl-2.1/trunk/debian/changelog Tue Dec 5 09:56:15 2006
@@ -5,8 +5,10 @@
[ Fabian Fagerholm ]
* debian/control: add Provides: libsasl2-gssapi-mit, as suggested by
Sam Hartman.
-
- -- Fabian Fagerholm <fabbe at debian.org> Mon, 4 Dec 2006 08:58:57 +0200
+ * debian/patches/0015_saslutil_decode64_fix.dpatch: add check to succeed
+ when input string is CR or LF terminated, as well.
+
+ -- Fabian Fagerholm <fabbe at debian.org> Tue, 5 Dec 2006 09:52:36 +0200
cyrus-sasl2 (2.1.22.dfsg1-5) unstable; urgency=low
Modified: cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch?rev=170&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch (original)
+++ cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch Tue Dec 5 09:56:15 2006
@@ -2,15 +2,15 @@
## 0015_saslutil_decode64_fix.dpatch by <fabbe at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: decode64 is not a complete implementation of the base64 spec.
+## DP: decode64 does not cover all cases that can arise in practise.
## DP: This patch fixes the case where no padding characters are needed
-## DP: but the input string is terminated by CRLF.
+## DP: but the input string is terminated by CRLF, CR or LF.
@DPATCH@
diff -urNad trunk~/lib/saslutil.c trunk/lib/saslutil.c
--- trunk~/lib/saslutil.c 2006-12-01 13:52:33.000000000 +0200
-+++ trunk/lib/saslutil.c 2006-12-01 13:54:49.000000000 +0200
-@@ -222,12 +222,14 @@
++++ trunk/lib/saslutil.c 2006-12-05 10:36:25.000000000 +0200
+@@ -222,12 +222,19 @@
}
if (inlen != 0) {
@@ -20,8 +20,13 @@
- } else {
- return (SASL_CONTINUE);
- }
-+ /* check for trailing CRLF */
-+ if (inlen != 2 && in[0] != '\r' && in[1] != '\n') {
++ /* check for trailing CRLF, CR or LF */
++ if ( (inlen == 2 && in[0] == '\r' && in[1] == '\n') ||
++ (inlen == 1 && in[0] == '\r') ||
++ (inlen == 1 && in[0] == '\n') ) {
++ /* do nothing; exit the if structure and return successfully */
++ ;
++ } else {
+ if (saw_equal) {
+ return SASL_BADPROT;
+ } else {
More information about the Pkg-cyrus-sasl2-commits
mailing list