From 3e8973cf4682143c6f2da6d7e7749bcfeaacea74 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 6 Feb 2019 16:06:30 +0100 Subject: [PATCH] it's not a truncation if the number fits into a buffer exactly Followup for 0ca2f2c --- libmariadb/ma_stmt_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb/ma_stmt_codec.c b/libmariadb/ma_stmt_codec.c index 2029b9c8..df1e3d16 100644 --- a/libmariadb/ma_stmt_codec.c +++ b/libmariadb/ma_stmt_codec.c @@ -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] */