[Pkg-cli-apps-commits] [SCM] keepass2 branch, master, updated. debian/2.15+dfsg-2-12-g00a56ed

Julian Taylor jtaylor.debian at googlemail.com
Tue Jun 21 17:43:05 UTC 2011


The following commit has been merged in the master branch:
commit f52225c8f6801446821d2f67fc6d9729600babde
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date:   Mon Jun 20 14:58:59 2011 +0200

    patch: make sure full block is read from crypto stream (LP: #798910)

diff --git a/debian/patches/19_make-sure-whole-block-is-read-from-crypto-stream.patch b/debian/patches/19_make-sure-whole-block-is-read-from-crypto-stream.patch
new file mode 100644
index 0000000..e085826
--- /dev/null
+++ b/debian/patches/19_make-sure-whole-block-is-read-from-crypto-stream.patch
@@ -0,0 +1,39 @@
+From: Julian Taylor <jtaylor.debian at googlemail.com>
+Date: Sun, 19 Jun 2011 19:05:11 +0200
+Subject: make sure whole block is read from crypto stream
+
+this fixes an issue with https streams where for some reason only
+2 bytes are read, leading to an Invalid Blocksize exception in
+the FinalDecrypt() of Mono.Security.Cryptography/SymmetricTransform.cs
+due to CryptoStream.Read considering a read smaller than the InputBlockSize
+as EndOfStream
+Incomplete read probably due to the header not aligned to 16 bytes.
+
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/keepass2/+bug/798910
+Applied-Upstream: 2.16
+
+---
+ KeePassLib/Cryptography/HashingStreamEx.cs |    9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/KeePassLib/Cryptography/HashingStreamEx.cs b/KeePassLib/Cryptography/HashingStreamEx.cs
+index f5ce5f8..6700a13 100644
+--- a/KeePassLib/Cryptography/HashingStreamEx.cs
++++ b/KeePassLib/Cryptography/HashingStreamEx.cs
+@@ -136,6 +136,15 @@ namespace KeePassLib.Cryptography
+ 
+ 			int nRead = m_sBaseStream.Read(pbBuffer, nOffset, nCount);
+ 
++			// Mono bug workaround (LaunchPad 798910)
++			int nPartialRead = nRead;
++			while((nRead < nCount) && (nPartialRead != 0))
++			{
++				nPartialRead = m_sBaseStream.Read(pbBuffer, nOffset + nRead,
++					nCount - nRead);
++				nRead += nPartialRead;
++			} 
++
+ #if DEBUG
+ 			byte[] pbOrg = new byte[pbBuffer.Length];
+ 			Array.Copy(pbBuffer, pbOrg, pbBuffer.Length);
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 6dd9879..afc2a79 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,3 +16,4 @@
 16_increase-tab-size-to-avoid-crash-on-changing-tabs.patch
 17_fix-ftp-stream-read.patch
 18_fix-autotype-of-apostrophes.patch
+19_make-sure-whole-block-is-read-from-crypto-stream.patch

-- 
keepass2



More information about the Pkg-cli-apps-commits mailing list