summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <dkatz@damien-katzs-computer.local>2007-07-17 14:43:56 -0400
committerunknown <dkatz@damien-katzs-computer.local>2007-07-17 14:43:56 -0400
commit4c090d82ee7ac2500c87f2b61647b359b348ed8e (patch)
tree22b683eb6b0bc6863cfd7e06fb3cf254ce906d90 /extra
parent1ca7aed52cf78de2874407d6029704be3754b53c (diff)
downloadmariadb-git-4c090d82ee7ac2500c87f2b61647b359b348ed8e.tar.gz
Bug #29784 YaSSL assertion failure when reading 8k key.
Fixed the yassl base64 decoding to correctly allocate a maximum decoded buffer size. mysql-test/std_data/server8k-cert.pem: BitKeeper file /Users/dkatz/50/mysql-test/std_data/server8k-cert.pem mysql-test/std_data/server8k-key.pem: BitKeeper file /Users/dkatz/50/mysql-test/std_data/server8k-key.pem extra/yassl/taocrypt/src/coding.cpp: Fixed buffer allocation to compute the proper maximum decoded size: (EncodedLength * 3/4) + 3 mysql-test/r/ssl_8k_key.result: New BitKeeper file ``mysql-test/r/ssl_8k_key.result'' Test connection to server using large SSL key. mysql-test/t/ssl_8k_key.test: New BitKeeper file ``mysql-test/t/ssl_8k_key.test'' Test connection to server using large SSL key.
Diffstat (limited to 'extra')
-rw-r--r--extra/yassl/taocrypt/src/coding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/yassl/taocrypt/src/coding.cpp b/extra/yassl/taocrypt/src/coding.cpp
index 68055b3aff4..55fe31831e3 100644
--- a/extra/yassl/taocrypt/src/coding.cpp
+++ b/extra/yassl/taocrypt/src/coding.cpp
@@ -184,7 +184,7 @@ void Base64Decoder::Decode()
{
word32 bytes = coded_.size();
word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz);
- plainSz = (plainSz * 3 + 3) / 4;
+ plainSz = ((plainSz * 3) / 4) + 3;
decoded_.New(plainSz);
word32 i = 0;