mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01: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:
parent
2c9f67938f
commit
eb06945b5b
1 changed files with 4 additions and 3 deletions
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue