[33058] in Kerberos

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

Re: Clearing credentials question

daemon@ATHENA.MIT.EDU (Markus Moeller)
Thu Jan 6 21:36:20 2011

To: kerberos@mit.edu
From: "Markus Moeller" <huaraz@moeller.plus.com>
Date: Fri, 7 Jan 2011 02:35:55 -0000
Message-ID: <ig5u6h$r1l$1@dough.gmane.org>
Mime-Version: 1.0
X-Complaints-To: usenet@dough.gmane.org
In-Reply-To: <1294358161.2456.336.camel@ray>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu


"Greg Hudson" <ghudson@MIT.EDU> wrote in message 
news:1294358161.2456.336.camel@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@mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
> 


________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

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