[Lsb-messages] /var/www/bzr/lsb/devel/runtime-test r1276: Fix incorrect data references in gethostbyaddr test (bug 2583).
Jeff Licquia
licquia at linuxfoundation.org
Thu May 2 17:40:04 UTC 2013
------------------------------------------------------------
revno: 1276
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: runtime-test
timestamp: Tue 2013-03-05 14:37:41 -0500
message:
Fix incorrect data references in gethostbyaddr test (bug 2583).
For AF_INET, gethostbyaddr should take a reference to a struct in_addr,
and that struct's length. The original test used an internal struct
member for the pointer, and the length of an entire sockaddr_in for the
length.
modified:
modules/lsb-os/tset/LSB.os/network/gethostbyaddr/gethostbyaddr.c
-------------- next part --------------
=== modified file 'modules/lsb-os/tset/LSB.os/network/gethostbyaddr/gethostbyaddr.c'
--- a/modules/lsb-os/tset/LSB.os/network/gethostbyaddr/gethostbyaddr.c 2012-03-08 23:35:06 +0000
+++ b/modules/lsb-os/tset/LSB.os/network/gethostbyaddr/gethostbyaddr.c 2013-03-05 19:37:41 +0000
@@ -76,7 +76,7 @@
}
h_errno=0;
- if((host=gethostbyaddr((struct in_addr *)&myaddr.sin_addr.s_addr,(socklen_t)sizeof(myaddr),AF_INET)) == NULL)
+ if((host=gethostbyaddr(&myaddr.sin_addr,(socklen_t)sizeof(myaddr.sin_addr),AF_INET)) == NULL)
{
err = h_errno;
tet_printf("gethostbyaddr() for 127.0.0.1 returned NULL");
More information about the lsb-messages
mailing list