You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-10 01:02:57 +03:00
it's not a truncation if the number fits into a buffer exactly
Followup for 0ca2f2c
This commit is contained in:
@@ -653,7 +653,7 @@ static void convert_from_long(MYSQL_BIND *r_param, const MYSQL_FIELD *field, lon
|
|||||||
/* check if field flag is zerofill */
|
/* check if field flag is zerofill */
|
||||||
if (field->flags & ZEROFILL_FLAG)
|
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);
|
ma_bmove_upp(buffer + field->length, buffer + len, len);
|
||||||
/* coverity [bad_memset] */
|
/* coverity [bad_memset] */
|
||||||
|
Reference in New Issue
Block a user