1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

webservices/tests: Fix -Warray-bounds warning on gcc 13.2.0.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
This commit is contained in:
Connor McAdams 2024-03-01 10:16:09 -05:00 committed by Alexandre Julliard
parent 2c9f67938f
commit eb06945b5b

View File

@ -1217,12 +1217,13 @@ static const char send_record_end[] = { 0x08, 0x02, 0x6e, 0x73, 0x89, 0xff, 0x01
static BOOL send_dict_str( int sock, char *addr, const char *str, int dict_str_count )
{
char buf[512], dict_buf[256], body_buf[128], dict_size_buf[5];
const int max_len = ARRAY_SIZE(dict_buf) - ARRAY_SIZE(dict_size_buf);
int offset, dict_buf_size, body_buf_size, dict_size;
/* Session dictionary strings. */
offset = write_size( dict_buf, strlen(str) );
memcpy( dict_buf + offset, str, strlen(str) );
dict_buf_size = strlen(str) + offset;
offset = write_size( dict_buf, strnlen(str, max_len) );
memcpy( dict_buf + offset, str, strnlen(str, max_len) );
dict_buf_size = strnlen( str, max_len ) + offset;
dict_size = write_size( dict_size_buf, dict_buf_size );