From 1a5e3fe1cceaf77dd6014c42a203825b32ea5dd7 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 2 Jun 1994 16:37:07 +0000 Subject: [PATCH] Fail safe in case krb5_os_localaddr returns NULL git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3666 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/des/new_rn_key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/crypto/des/new_rn_key.c b/src/lib/crypto/des/new_rn_key.c index 2d34df19d..3a884cca5 100644 --- a/src/lib/crypto/des/new_rn_key.c +++ b/src/lib/crypto/des/new_rn_key.c @@ -94,14 +94,14 @@ void mit_des_init_random_number_generator(key,p_seed) } timenow; mit_des_cblock new_key; - krb5_address **addrs; + krb5_address **addrs = 0; /* * use a host id in generating the seed to ensure * that different servers have different streams: */ memset((char *)seed, 0, sizeof(seed)); - if (!krb5_os_localaddr(&addrs) && *addrs) { + if (!krb5_os_localaddr(&addrs) && addrs && *addrs) { memcpy((char *)seed, (char *)addrs[0]->contents, min(sizeof(seed), addrs[0]->length)); /* XXX may not do all of the seed. */ -- 2.26.2