From: Theodore Tso Date: Thu, 2 Jun 1994 16:37:07 +0000 (+0000) Subject: Fail safe in case krb5_os_localaddr returns NULL X-Git-Tag: krb5-1.0-beta4~185 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a5e3fe1cceaf77dd6014c42a203825b32ea5dd7;p=krb5.git Fail safe in case krb5_os_localaddr returns NULL git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3666 dc483132-0cff-0310-8789-dd5450dbe970 --- 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. */