diff options
author | Walter de Jong <walter@heiho.net> | 2013-03-27 22:24:10 +0100 |
---|---|---|
committer | Walter de Jong <walter@heiho.net> | 2013-03-27 22:24:10 +0100 |
commit | e30be9cc383f264219a37e289b4a81b1d1321374 (patch) | |
tree | eba237ddbd5b5d70d9b247eba43852439294ac6c /libtac/lib/connect.c | |
parent | 7e974ff163e10a49a096a1ac2f7620dfb59749ca (diff) | |
download | pam_tacplus-e30be9cc383f264219a37e289b4a81b1d1321374.tar.gz pam_tacplus-e30be9cc383f264219a37e289b4a81b1d1321374.zip |
same thing, but less confusing
Note that this does not change anything in regards to buffer overflowing
Diffstat (limited to 'libtac/lib/connect.c')
-rw-r--r-- | libtac/lib/connect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libtac/lib/connect.c b/libtac/lib/connect.c index f3ead9f..1844381 100644 --- a/libtac/lib/connect.c +++ b/libtac/lib/connect.c @@ -186,14 +186,14 @@ char *tac_ntop(const struct sockaddr *sa, size_t unused) { str, INET_ADDRSTRLEN); snprintf(portstr, sizeof(portstr), ":%hu", htons(((struct sockaddr_in *)sa)->sin_port)); - strncat(str, portstr, sizeof(portstr)); + strcat(str, portstr); break; case AF_INET6: inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)sa)->sin6_addr), str, INET6_ADDRSTRLEN); snprintf(portstr, sizeof(portstr), ":%hu", htons(((struct sockaddr_in6 *)sa)->sin6_port)); - strncat(str, portstr, sizeof(portstr)); + strcat(str, portstr); break; default: strncpy(str, "Unknown AF", INET6_ADDRSTRLEN); |