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


libmysql/libmysql.c:
  We shouldn't fall if the buffer_length is bigger than 330
This commit is contained in:
unknown
2004-09-07 14:30:53 +05:00
parent 9d8d16ccf7
commit a1d960418c

View File

@ -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;
}