diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-04-21 23:14:49 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-04-21 23:14:49 +0000 |
commit | 3376608c3df0c522c2b928c72f7e89cee7c9e949 (patch) | |
tree | f042012d30e24c91b24558dfc34afc0fa4d73ecd /src/tests/dejagnu | |
parent | 496aa945b271b670628a5c69df591f5768d5987f (diff) | |
download | krb5-3376608c3df0c522c2b928c72f7e89cee7c9e949.tar.gz krb5-3376608c3df0c522c2b928c72f7e89cee7c9e949.tar.xz krb5-3376608c3df0c522c2b928c72f7e89cee7c9e949.zip |
In t_inetd, zero out l_inaddr before filling it in, as is relatively
common in networking code. Silences a Coverity defect.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23916 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/dejagnu')
-rw-r--r-- | src/tests/dejagnu/t_inetd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/dejagnu/t_inetd.c b/src/tests/dejagnu/t_inetd.c index dbee2838df..72d51fd7f6 100644 --- a/src/tests/dejagnu/t_inetd.c +++ b/src/tests/dejagnu/t_inetd.c @@ -46,6 +46,7 @@ #include <arpa/inet.h> #include <netdb.h> #include <stdio.h> +#include <string.h> #include <fcntl.h> #include <errno.h> #include <signal.h> @@ -97,6 +98,7 @@ main(argc, argv) (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof (one)); + memset(&l_inaddr, 0, sizeof(l_inaddr)); l_inaddr.sin_family = AF_INET; l_inaddr.sin_addr.s_addr = 0; l_inaddr.sin_port = port; |