diff options
author | unknown <hartmut@mysql.com> | 2005-09-30 18:16:57 +0200 |
---|---|---|
committer | unknown <hartmut@mysql.com> | 2005-09-30 18:16:57 +0200 |
commit | 7d3c939e81f8da8c9f57421864e07b4315f03f57 (patch) | |
tree | e8f6638a94b8cca6df059c2a836b5b37761c6195 /extra | |
parent | 0585fcbe639000fa9e4210e2a4149570268f8a72 (diff) | |
parent | 39ba8376e6a3331a2c75fb3f9f5fbd6ff42f6a62 (diff) | |
download | mariadb-git-7d3c939e81f8da8c9f57421864e07b4315f03f57.tar.gz |
Merge hholzgraefe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/hartmut/projects/mysql/dev/5.0
ndb/tools/ndb_config.cpp:
Auto merged
Diffstat (limited to 'extra')
-rw-r--r-- | extra/yassl/mySTL/vector.hpp | 3 | ||||
-rw-r--r-- | extra/yassl/taocrypt/include/hmac.hpp | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/extra/yassl/mySTL/vector.hpp b/extra/yassl/mySTL/vector.hpp index e7f63c37c7c..9eab91cfda8 100644 --- a/extra/yassl/mySTL/vector.hpp +++ b/extra/yassl/mySTL/vector.hpp @@ -45,7 +45,8 @@ struct vector_base { vector_base() : start_(0), finish_(0), end_of_storage_(0) {} vector_base(size_t n) { - start_ = static_cast<T*>(malloc(n * sizeof(T))); + // Don't allow malloc(0), if n is 0 use 1 + start_ = static_cast<T*>(malloc((n ? n : 1) * sizeof(T))); if (!start_) abort(); finish_ = start_; end_of_storage_ = start_ + n; diff --git a/extra/yassl/taocrypt/include/hmac.hpp b/extra/yassl/taocrypt/include/hmac.hpp index 543366afc3a..cf029812ce2 100644 --- a/extra/yassl/taocrypt/include/hmac.hpp +++ b/extra/yassl/taocrypt/include/hmac.hpp @@ -56,12 +56,12 @@ private: T mac_; // MSVC 6 HACK, gives compiler error if calculated in array - enum { BSIZE = T::BLOCK_SIZE / sizeof(word32), - DSIZE = T::DIGEST_SIZE / sizeof(word32) }; + enum { HMAC_BSIZE = T::BLOCK_SIZE / sizeof(word32), + HMAC_DSIZE = T::DIGEST_SIZE / sizeof(word32) }; - word32 ip_[BSIZE]; // align ipad_ on word32 - word32 op_[BSIZE]; // align opad_ on word32 - word32 innerH_[DSIZE]; // align innerHash_ on word32 + word32 ip_[HMAC_BSIZE]; // align ipad_ on word32 + word32 op_[HMAC_BSIZE]; // align opad_ on word32 + word32 innerH_[HMAC_DSIZE]; // align innerHash_ on word32 void KeyInnerHash(); |