mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +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
|
@ -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 New Issue