summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka/test_dyndns.c
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-08-20 17:32:04 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-08-22 10:51:18 +0200
commite210ed5da220acebb6751db4466fe352de08eaeb (patch)
tree0cc7fccd5e675fa35de43b1cd773e9f7720aefbd /src/tests/cmocka/test_dyndns.c
parent885386b7e3f1c3e74b354576b98a092b0835d64e (diff)
downloadsssd-e210ed5da220acebb6751db4466fe352de08eaeb.tar.gz
sssd-e210ed5da220acebb6751db4466fe352de08eaeb.tar.xz
sssd-e210ed5da220acebb6751db4466fe352de08eaeb.zip
dyndns_test: Use right socket length of for IPv4 address.
man inet_ntop says: The caller specifies the number of bytes available in this buffer in the argument size. AF_INET src points to a struct in_addr (in network byte order) which is converted to an IPv4 network address in the dotted-decimal format, "ddd.ddd.ddd.ddd". The buffer dst must be at least INET_ADDRSTRLEN bytes long. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/tests/cmocka/test_dyndns.c')
-rw-r--r--src/tests/cmocka/test_dyndns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c
index b0e8df81b..b7e45a19d 100644
--- a/src/tests/cmocka/test_dyndns.c
+++ b/src/tests/cmocka/test_dyndns.c
@@ -194,7 +194,7 @@ void dyndns_test_get_ifaddr(void **state)
assert_non_null(inet_ntop(AF_INET,
&((struct sockaddr_in *) addrlist->addr)->sin_addr,
- straddr, INET6_ADDRSTRLEN));
+ straddr, INET_ADDRSTRLEN));
assert_string_equal(straddr, "192.168.0.1");
talloc_free(addrlist);