1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

it's not a truncation if the number fits into a buffer exactly

Followup for 0ca2f2c
This commit is contained in:
Sergei Golubchik
2019-02-06 16:06:30 +01:00
parent 95b5dea9bd
commit 3e8973cf46

View File

@@ -653,7 +653,7 @@ static void convert_from_long(MYSQL_BIND *r_param, const MYSQL_FIELD *field, lon
/* check if field flag is zerofill */
if (field->flags & ZEROFILL_FLAG)
{
if (len < field->length && len < r_param->buffer_length)
if (len <= field->length && len < r_param->buffer_length)
{
ma_bmove_upp(buffer + field->length, buffer + len, len);
/* coverity [bad_memset] */