mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for the bug #5371 (Prepared query converting float to string blows the
stack) We just don't expect BIG buffer to be sent for just a double libmysql/libmysql.c: We shouldn't fall if the buffer_length is bigger than 330
This commit is contained in:
@ -3490,7 +3490,7 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
if (field->decimals >= 31)
|
||||
#undef NOT_FIXED_DEC
|
||||
{
|
||||
sprintf(buff, "%-*.*g", (int) param->buffer_length, width, value);
|
||||
sprintf(buff, "%-*.*g", (int) min(330, param->buffer_length), width, value);
|
||||
end= strcend(buff, ' ');
|
||||
*end= 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user