summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-09-07 14:30:53 +0500
committerhf@deer.(none) <>2004-09-07 14:30:53 +0500
commite4ef0eadf2b259529778fe7902470472f381814a (patch)
treee25c461446dcc22a573ff516927d9903e24b33b2 /libmysql
parent3da2a24116db6f0bfdd22241b9a4d48076994bfb (diff)
downloadmariadb-git-e4ef0eadf2b259529778fe7902470472f381814a.tar.gz
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
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 7d71998f37d..b4871f6bb9d 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -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;
}