[1185] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: key data version as array index

daemon@ATHENA.MIT.EDU (Barry Jaspan)
Wed May 15 17:26:33 1996

Date: Wed, 15 May 1996 17:26:24 -0400
From: "Barry Jaspan" <bjaspan@MIT.EDU>
To: marc@MIT.EDU
Cc: proven@cygnus.com, krbdev@MIT.EDU
In-Reply-To: <9605152124.AA14600@beeblebrox.MIT.EDU> (message from Marc Horowitz on Wed, 15 May 1996 17:24:38 EDT)


   >> > 
   >> > I've seen code like this in a few places in libkdb:
   >> > 
   >> >     for (i = 0; i < key_data->key_data_ver; i++)
   >> > 	if (key_data->key_data_contents[i])
   >> > 	    krb5_xfree(key_data->key_data_contents[i]);
   >> > 

   I've seen this code, too.  I understood that its purpose was what
   proven said, but something else bothers me.  IMHO, the code should
   check the actual value of the key_data_ver, not use it as a loop
   limit...

Well, right; that is the very issue that caused me to send the mail in
the first place.  I guess I didn't make the point clearly, though.

Barry

home help back first fref pref prev next nref lref last post