From a042450523827506daad640dafdd4d5ea2ef0d66 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 13 Sep 1995 23:02:18 +0000 Subject: [PATCH] Clear the buffer before calling the SIOCGIFCONF ioctl. This makes purify happy. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6782 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/os/ChangeLog | 6 ++++++ src/lib/crypto/os/c_localaddr.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/crypto/os/ChangeLog b/src/lib/crypto/os/ChangeLog index 1c42e5228..78cda02df 100644 --- a/src/lib/crypto/os/ChangeLog +++ b/src/lib/crypto/os/ChangeLog @@ -1,3 +1,9 @@ +Wed Sep 13 17:32:36 1995 Theodore Y. Ts'o + + * c_localaddr.c (krb5_crypto_os_localaddr): Clear the buffer + before calling the SIOCGIFCONF ioctl. This makes purify + happy. + Thu Sep 7 12:00:00 1995 James Mattly * Renamed ustime.c to c_ustime.c diff --git a/src/lib/crypto/os/c_localaddr.c b/src/lib/crypto/os/c_localaddr.c index 7ab153a8a..c1d75cf70 100644 --- a/src/lib/crypto/os/c_localaddr.c +++ b/src/lib/crypto/os/c_localaddr.c @@ -117,9 +117,10 @@ krb5_crypto_os_localaddr(addr) int n_found; int mem_err = 0; + memset(buf, 0, sizeof(buf)); ifc.ifc_len = sizeof(buf); ifc.ifc_buf = buf; - + s = socket (USE_AF, USE_TYPE, USE_PROTO); if (s < 0) return errno; -- 2.26.2