mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-8407 Numeric errors, server crash with COLUMN_JSON() on DECIMAL with precision > 40
In fact it was error in decimal library (incorrect processing of buffer overflow) invisible from other server parts because of buffer allocation and precision tests.
This commit is contained in:
@ -383,7 +383,8 @@ int decimal2string(const decimal_t *from, char *to, int *to_len,
|
||||
}
|
||||
else
|
||||
frac-=j;
|
||||
len= from->sign + intg_len + test(frac) + frac_len;
|
||||
frac_len= frac;
|
||||
len= from->sign + intg_len + test(frac) + frac;
|
||||
}
|
||||
*to_len=len;
|
||||
s[len]=0;
|
||||
|
Reference in New Issue
Block a user