[Cryptography] GOTO Considered Harmful

ianG iang at iang.org
Tue Mar 4 09:08:01 EST 2014


On 28/02/2014 18:07 pm, Patrick Chkoreff wrote:
> I refactored Apple's code:
> 
> http://fexl.com/goto-considered-harmful
> 
> You're welcome.

Oh, Patrick, your cup runneth over!

http://www.securityfocus.com/archive/1/531330

https://www.gitorious.org/gnutls/gnutls/commit/6aa26f78150ccbdf0aec1878a41c17c41d358a3b

We've got overloading of error variables, use of manifest numbers (1 as
success, 0 fail, -1 gotcha), use of the famed goto cleanup mechanism,
leading to more gotos than worms in an apple, ... and now a patch which
adds a separate goto branch!

Unbelievable!

All kudos to Nikos Mavrogiannopoulos, who took the initiative to trawl
through this code in the wake of the apple bug.

iang


More information about the cryptography mailing list