1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Merge pull request #778 from davidjmott/branches/davidjmott/MCOL-3353

fix to possible memory corruption
This commit is contained in:
David.Hall
2019-06-17 10:53:19 -05:00
committed by GitHub

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);