You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix length calculation
When calculating the length of buffer for prepared statement executiong a maximum length of 5 for length encoded types was used. This should be 9, since length encoded types starting with 0xFE are followed by length of 8 bytes.
This commit is contained in:
@@ -805,7 +805,7 @@ unsigned char* mysql_stmt_execute_generate_simple_request(MYSQL_STMT *stmt, size
|
||||
case MYSQL_TYPE_ENUM:
|
||||
case MYSQL_TYPE_BIT:
|
||||
case MYSQL_TYPE_SET:
|
||||
size+= 5; /* max 8 bytes for size */
|
||||
size+= 9; /* max 8 bytes for size */
|
||||
size+= (size_t)ma_get_length(stmt, i, 0);
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user