Skip Menu |
 

To: krb5-bugs@MIT.EDU
Date: Wed, 21 Sep 2005 16:47:34 -0400 (EDT)
From: hartmans@MIT.EDU (Sam Hartman)
Subject: init_ctx.c has goto labels crossing outside of switch arms


the copy_subkey label in the switch statement that decides what gssapi
algorithm we are using needs to be factored out.

Currently if you remove the des arm of the switch, the rest of the
switch statement breaks because there is a goto back into that block.

Please factor this out of the switch statement.
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #3181] init_ctx.c has goto labels crossing outside of switch arms
Date: Wed, 21 Sep 2005 19:23:17 -0700
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
On Sep 21, 2005, at 13:48, Sam Hartman via RT wrote:

Show quoted text
> the copy_subkey label in the switch statement that decides what gssapi
> algorithm we are using needs to be factored out.
>

Yes.


Show quoted text
> Currently if you remove the des arm of the switch, the rest of the
> switch statement breaks because there is a goto back into that block.
>

As I said in person, I disagree that you should necessarily always be
able to do this. Sometimes common code for a subset of the arms of a
switch is reasonable thing to do. (Maybe not in this case, but I
don't agree with the assumption.)


Show quoted text
> Please factor this out of the switch statement.
>

We could also clean up a lot of code here if we actually decide to
nuke the sort-of-rfc1964 "big endian" support. That's a lot more
interesting than one minor switch statement....

Ken