[Pkg-cyrus-sasl2-commits] r164 - in
/cyrus-sasl-2.1/trunk/debian/patches:
0015_saslutil_decode64_fix.dpatch 00list
fabbe at users.alioth.debian.org
fabbe at users.alioth.debian.org
Fri Dec 1 13:02:45 CET 2006
Author: fabbe
Date: Fri Dec 1 13:02:44 2006
New Revision: 164
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/?sc=1&rev=164
Log:
First attempt to fix decode64.
Added:
cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch (with props)
Modified:
cyrus-sasl-2.1/trunk/debian/patches/00list
Added: 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=164&op=file
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch (added)
+++ cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch Fri Dec 1 13:02:44 2006
@@ -1,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 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: This patch fixes the case where no padding characters are needed
+## DP: but the input string is terminated by CRLF.
+
+ at 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 @@
+ }
+
+ if (inlen != 0) {
+- if (saw_equal) {
+- /* Unless there is CRLF at the end? */
+- return SASL_BADPROT;
+- } else {
+- return (SASL_CONTINUE);
+- }
++ /* check for trailing CRLF */
++ if (inlen != 2 && in[0] != '\r' && in[1] != '\n') {
++ if (saw_equal) {
++ return SASL_BADPROT;
++ } else {
++ return (SASL_CONTINUE);
++ }
++ }
+ }
+
+ *out = '\0'; /* NUL terminate the output string */
Propchange: cyrus-sasl-2.1/trunk/debian/patches/0015_saslutil_decode64_fix.dpatch
------------------------------------------------------------------------------
svn:executable = *
Modified: cyrus-sasl-2.1/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/patches/00list?rev=164&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/patches/00list (original)
+++ cyrus-sasl-2.1/trunk/debian/patches/00list Fri Dec 1 13:02:44 2006
@@ -12,3 +12,4 @@
0012_xopen_crypt_prototype
0013_fix_hurd_build
0014_avoid_pic_overwrite
+0015_saslutil_decode64_fix
More information about the Pkg-cyrus-sasl2-commits
mailing list