List:Commits« Previous MessageNext Message »
From:Ole John Aske Date:October 11 2010 9:55am
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch
(ole.john.aske:3308)
View as plain text  
#At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:ole.john.aske@stripped

 3308 Ole John Aske	2010-10-11
      spj-svs: Fixed an undefined memory read
      
      Fixed a situation where an empty 'm_spjProjection' will cause 
      NdbQueryOperationDefImpl::appendChildProjection() to set the QueryTree flag 'NI_LINKED_ATTR' without
      appending a projection list to the serialized query tree.
      
      This fix will ensure that a serialized m_spjProjection list with size==0 will be included in these cases.
      
      No testcase as I can't think of any deterministic ways to make a testcase for an undefined memory read....

    modified:
      storage/ndb/src/ndbapi/NdbQueryBuilder.cpp
=== modified file 'storage/ndb/src/ndbapi/NdbQueryBuilder.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryBuilder.cpp	2010-10-11 09:48:36 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryBuilder.cpp	2010-10-11 09:55:24 +0000
@@ -1810,11 +1810,9 @@ public:
     m_pos(0),
     m_finished(false)
  {
-    if (size > 0) {
-      m_seq = buffer.alloc(1 + size/2);
-      assert (size <= 0xFFFF);
-      m_seq[0] = size;
-    }
+    m_seq = buffer.alloc(1 + size/2);
+    assert (size <= 0xFFFF);
+    m_seq[0] = size;
   }
 
   ~Uint16Sequence()


Attachment: [text/bzr-bundle] bzr/ole.john.aske@oracle.com-20101011095524-c6k1ptd3zvc3ipl8.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3308) Ole John Aske11 Oct