projects
/
fwknop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
47ea800
)
port strlen bugfix
author
Michael Rash
<mbr@cipherdyne.org>
Sat, 19 Jan 2013 03:11:32 +0000 (22:11 -0500)
committer
Michael Rash
<mbr@cipherdyne.org>
Sat, 19 Jan 2013 03:11:32 +0000 (22:11 -0500)
client/spa_comm.c
patch
|
blob
|
history
diff --git
a/client/spa_comm.c
b/client/spa_comm.c
index
4ed9e58
..
0716b70
100644
(file)
--- a/
client/spa_comm.c
+++ b/
client/spa_comm.c
@@
-101,7
+101,7
@@
send_spa_packet_tcp_or_udp(const char *spa_data, const int sd_len,
{
int sock, res=0, error;
struct addrinfo *result, *rp, hints;
- char port_str[MAX_PORT_STR_LEN];
+ char port_str[MAX_PORT_STR_LEN+1];
if (options->test)
{
@@
-130,7
+130,7
@@
send_spa_packet_tcp_or_udp(const char *spa_data, const int sd_len,
hints.ai_protocol = IPPROTO_TCP;
}
- snprintf(port_str, MAX_PORT_STR_LEN, "%d", options->spa_dst_port);
+ snprintf(port_str, MAX_PORT_STR_LEN+1, "%d", options->spa_dst_port);
error = getaddrinfo(options->spa_server_str, port_str, &hints, &result);