1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

fix to possible memory corruption

This commit is contained in:
David Mott
2019-06-03 03:36:48 -05:00
parent dd3df5328c
commit fff18e0dd4

View File

@ -326,7 +326,8 @@ void ArithmeticColumn::serialize(messageqcpp::ByteStream& b) const
ObjectReader::writeParseTree(fExpression, b);
b << fTableAlias;
b << fData;
b << static_cast<const ByteStream::doublebyte>(fAsc);
const ByteStream::doublebyte tmp = fAsc;
b << tmp;
}
void ArithmeticColumn::unserialize(messageqcpp::ByteStream& b)
@ -340,7 +341,9 @@ void ArithmeticColumn::unserialize(messageqcpp::ByteStream& b)
fExpression = ObjectReader::createParseTree(b);
b >> fTableAlias;
b >> fData;
b >> reinterpret_cast< ByteStream::doublebyte&>(fAsc);
ByteStream::doublebyte tmp;
b >> tmp;
fAsc = (tmp);
fSimpleColumnList.clear();
fExpression->walk(getSimpleCols, &fSimpleColumnList);