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

MCOL-5493: First portion of UBSan fixes (#2842)

Multiple UB fixes
This commit is contained in:
Leonid Fedorov
2023-06-02 17:02:09 +03:00
committed by GitHub
parent 0a2e9760ee
commit 8f93fc3623
31 changed files with 274 additions and 916 deletions

View File

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