diff --git a/config/ac-macros/yassl.m4 b/config/ac-macros/yassl.m4 index 7af39db48be018d0b0caf472c2684bc2a761663c..972e4530dab3b512d092df48c36598b5d8ad3d52 100644 --- a/config/ac-macros/yassl.m4 +++ b/config/ac-macros/yassl.m4 @@ -23,13 +23,14 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [ # System specific checks yassl_integer_extra_cxxflags="" - case $SYSTEM_TYPE--$CXX_VERSION in - sparc*solaris*--*Sun*C++*5.6*) + case $host_cpu--$CXX_VERSION in + sparc*--*Sun*C++*5.6*) # Disable inlining when compiling taocrypt/src/integer.cpp yassl_integer_extra_cxxflags="+d" + AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/integer.cpp]) ;; esac - AC_SUBST([yassl_integer_extra_cxxflags]) + AC_SUBST([yassl_integer_extra_cxxflags]) else yassl_dir="" diff --git a/extra/yassl/mySTL/vector.hpp b/extra/yassl/mySTL/vector.hpp index e7f63c37c7cbe321e2258dc3acc480dc89b5c347..9eab91cfda8ecba83c7e48e21490c93e59d6cda6 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 543366afc3a88e898f6e00a7e54a9b1370c9dbbb..cf029812ce28378e15b6980033255c939c5852e0 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();