Clearing credentials question

Markus Moeller huaraz at moeller.plus.com
Thu Jan 6 21:35:55 EST 2011


"Greg Hudson" <ghudson at MIT.EDU> wrote in message 
news:1294358161.2456.336.camel at ray...
> On Thu, 2011-01-06 at 18:04 -0500, Markus Moeller wrote:
>> Shouldn't
>> krb5_free_keyblock_contents check if the content is not zero ?
>
> It does.
>
>> int main() {
> [...]
>> krb5_creds  creds;
> [...]
>> code = krb5_parse_name(context, cclient, &creds.client);
>> code = krb5_parse_name(context, cserver, &creds.server);
> [...]
>> krb5_free_cred_contents(context, &creds);
>
> You declared creds as an automatic variable and didn't initialize it, so
> all of its fields except for client and server contain stack garbage at
> the time of the krb5_free_cred_contents call.
>

I get the same error if I set

creds.keyblock.contents = NULL;

before cleaning the content.

Markus
>
> ________________________________________________
> Kerberos mailing list           Kerberos at mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
> 





More information about the Kerberos mailing list