diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-11-19 22:04:51 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-11-19 22:04:51 +0100 |
commit | ed2cc2a8cb6a657110f921931fafd999679b331c (patch) | |
tree | b86e2b965c7cd702dffbbe022fefa2a3b9b5d42e | |
parent | d851d5e70cf7ce2c1aacdf2119d7ecaacc8835d2 (diff) | |
download | mariadb-git-ed2cc2a8cb6a657110f921931fafd999679b331c.tar.gz |
Fix YaSSL on windows
This came with the upgrade from yassl 2.3.0 to 2.3.4 -
ssl tests started to hang on Windows. Comparing and removing changes
I've got to this:
void input_buffer::set_current(uint i)
{
- if (i)
- check(i - 1, size_);
- current_ = i;
+ if (error_ == 0 && i && check(i - 1, size_) == 0)
+ current_ = i;
+ else
+ error_ = -1;
}
in 2.3.0 i==0 was only used to avoid the check, in 2.3.4 it's an error.
but there are places in the code that do set_current(0) and others that
do, like, { before=get_current(); ...; set_current(before); } - and the
initial value of current_ is 0.
So, I suspect that set_current(0) should not be an error, but it should
only skip the check().
-rw-r--r-- | extra/yassl/src/buffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index b7a77f478f8..ee5e0cc0793 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -165,7 +165,7 @@ void input_buffer::set_error() void input_buffer::set_current(uint i) { - if (error_ == 0 && i && check(i - 1, size_) == 0) + if (error_ == 0 && (i == 0 || check(i - 1, size_) == 0)) current_ = i; else error_ = -1; |