mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#55436: buffer overflow in debug binary of dbug_buff in Field_new_decimal::store_value
There were some misunderstandings about parameters pertaining to buffer-size. Patches fixes the reported off by one and clarifies the documentation. mysql-test/r/type_newdecimal.result: add test mysql-test/t/type_newdecimal.test: add test sql/field.cc: adjust buffer size by one to account for terminator. sql/my_decimal.cc: adjust buffer size by one to account for terminator. clarify needs in comments. sql/my_decimal.h: clarify buffer-size needs to prevent future off-by-one bugs. strings/decimal.c: clarify buffer-size needs and parameters to prevent future off-by-one bugs
This commit is contained in:
@ -1510,5 +1510,19 @@ group by PAY.id + 1;
|
||||
|
||||
DROP TABLE currencies, payments, sub_tasks;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55436: buffer overflow in debug binary of dbug_buff in
|
||||
--echo # Field_new_decimal::store_value
|
||||
--echo #
|
||||
|
||||
# this threw memory warnings on Windows. Also make sure future changes
|
||||
# don't change these results, as per usual.
|
||||
SET SQL_MODE='';
|
||||
CREATE TABLE t1(f1 DECIMAL(44,24)) ENGINE=MYISAM;
|
||||
INSERT INTO t1 SET f1 = -64878E-85;
|
||||
SELECT f1 FROM t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user