MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:msvensson Date:September 27 2005 2:34pm
Subject:bk commit into 5.0 tree (msvensson:1.1970) BUG#13163
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1970 05/09/27 16:34:49 msvensson@neptunus.(none) +1 -0
  Bug #13163 yassl: aix52 crash with ssl turned on
   - It seems like malloc(0) returns a null pointer on aix52

  extra/yassl/mySTL/vector.hpp
    1.4 05/09/27 16:34:45 msvensson@neptunus.(none) +2 -1
    Don't allow malloc(0), if n is 0 use 1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug13163/my50-bug13163

--- 1.3/extra/yassl/mySTL/vector.hpp	2005-05-31 17:56:24 +02:00
+++ 1.4/extra/yassl/mySTL/vector.hpp	2005-09-27 16:34:45 +02:00
@@ -45,7 +45,8 @@
     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;
Thread
bk commit into 5.0 tree (msvensson:1.1970) BUG#13163msvensson27 Sep