diff options
author | msvensson@neptunus.(none) <> | 2005-09-27 16:36:14 +0200 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2005-09-27 16:36:14 +0200 |
commit | 39dde505fd1e1261395fa6c949ca56628e60f273 (patch) | |
tree | e56bedb66dbc40ce86734bb914b0e740553ab003 | |
parent | fa554264ff1488cb552f37c161b07d2b8c34d8a1 (diff) | |
parent | e0b4e273f613d360a813e52dd6d221c8d192873e (diff) | |
download | mariadb-git-39dde505fd1e1261395fa6c949ca56628e60f273.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug13163/my50-bug13163
-rw-r--r-- | extra/yassl/mySTL/vector.hpp | 3 |
1 files changed, 2 insertions, 1 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; |