You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-04 04:42:30 +03:00
fix(ubsan): MCOL-5844 - iron out UBSAN reports
The most important fix here is the fix of possible buffer overrun in DATEFORMAT() function. A "%W" format, repeated enough times, would overflow the 256-bytes buffer for result. Now we use ostringstream to construct result and we are safe. Changes in date/time projection functions made me fix difference between us and server behavior. The new, better behavior is reflected in changes in tests' results. Also, there was incorrect logic in TRUNCATE() and ROUND() functions in computing the decimal "shift."
This commit is contained in:
committed by
Leonid Fedorov
parent
3bcc2e2fda
commit
39a976c39a
@ -65,6 +65,14 @@ class Message
|
||||
*/
|
||||
void add(uint64_t i);
|
||||
|
||||
/* define types to not to include mcs_numeric_limits.h */
|
||||
using int128_t = __int128;
|
||||
using uint128_t = unsigned __int128;
|
||||
|
||||
/** @brief add an 128 bit int arg to the message
|
||||
*/
|
||||
void add(int128_t i128);
|
||||
|
||||
/** @brief add a float arg to the message
|
||||
*/
|
||||
void add(double d);
|
||||
|
Reference in New Issue
Block a user