mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-22 21:33:33 +02:00
Fix strncat size argument in send_handshake_query
Found by clang: client.c:1276:26: warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size] strncat(buf, topdomain, sizeof(buf) - strlen(buf)); ^~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
b7b1082dc6
commit
8d2c86c73d
1 changed files with 1 additions and 1 deletions
|
@ -1273,7 +1273,7 @@ send_handshake_query(int fd, char *prefix)
|
|||
buf[0] = 0;
|
||||
strncat(buf, prefix, 60); /* 63 - space for 3 CMC bytes */
|
||||
strcat(buf, cmc_dot);
|
||||
strncat(buf, topdomain, sizeof(buf) - strlen(buf));
|
||||
strncat(buf, topdomain, sizeof(buf) - strlen(buf) - 1);
|
||||
send_query(fd, buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue