summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-09-07 14:30:53 +0500
committerunknown <hf@deer.(none)>2004-09-07 14:30:53 +0500
commita1d960418c1b1309a27e222f2249b730e39711a5 (patch)
treee25c461446dcc22a573ff516927d9903e24b33b2 /libmysql
parent9d8d16ccf7584b4c40b0bfab9eee6662f6e39c56 (diff)
downloadmariadb-git-a1d960418c1b1309a27e222f2249b730e39711a5.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 libmysql/libmysql.c: We shouldn't fall if the buffer_length is bigger than 330
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;
}