Fixed bug #31019: the MOD() function and the % operator crash the server
when a divisor is less than 1 and its fractional part is very long. For example: 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789; Stack buffer overflow has been fixed in the do_div_mod function. strings/decimal.c: Fixed bug #31019. Stack buffer overflow has been fixed in the do_div_mod function: a value of the upper bound of the buffer was increased where a decrement is required. mysql-test/t/type_decimal.test: Added test case for bug #31019. mysql-test/r/type_decimal.result: Added test case for bug #31019.
Showing
Please register or sign in to comment