1
0
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
This commit is contained in:
hf@deer.(none)
2004-09-07 14:30:53 +05:00
parent 3da2a24116
commit e4ef0eadf2

View File

@ -3490,7 +3490,7 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
if (field->decimals >= 31) if (field->decimals >= 31)
#undef NOT_FIXED_DEC #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= strcend(buff, ' ');
*end= 0; *end= 0;
} }