You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-838 Enforce copy of string in StringStore
Since we aren't using C++11 the deserialize was doing using reference counts for string copy which occasionally caused a use after free.
This commit is contained in:
@ -144,7 +144,7 @@ uint32_t StringStore::deserialize(ByteStream &bs)
|
||||
for (i = 0; i < count; i++) {
|
||||
//cout << "deserializing " << size << " bytes\n";
|
||||
bs >> buf;
|
||||
shared_ptr<std::string> newString(new std::string(buf));
|
||||
shared_ptr<std::string> newString(new std::string(buf.c_str()));
|
||||
mem.push_back(newString);
|
||||
//bs.advance(size);
|
||||
ret += (size + 4);
|
||||
|
Reference in New Issue
Block a user