Commit e4ef0ead authored by hf@deer.(none)'s avatar hf@deer.(none)

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
parent 3da2a241
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment