Goto fail
opensource.apple.com
Goto fail
1–10 of 32 posts
Re: Goto fail
#2Re: Goto fail
#3Goto lives!
Re: Goto fail
#4Re: Goto fail
#5I feel like there should be something obvious here that I'm missing...
Re: Goto fail
#6I'm working on some ffmpeg code at the moment. ffmpeg 2.0 contains 554 occurrences of "goto fail".
Edit: okay, it appears that the point of OP's post is that someone appears to have copy/pasted an extra "goto fail" at line 631, short circuiting the remainder of the SSLVerifySignedServerKeyExchange function and needlessly jumping to fail. I assume this was the code that Apple needed to patch in iOS 7.0.6 today?
Re: Goto fail
#7This file is one of them: multiple branches that can end to the same leaf.
Another would be break in interlocked loops, or clean failing when the software detect an hard failure and no memory can be used anymore.
For this last case, you can also prepare some error handling frames at the init, and longjump (like a goto, but with already allocated stack memory) when it's time to fail.
Re: Goto fail
#8 if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
Compulsory bracing of blocks following if/while etc is a piece of syntax Perl got 100% right. Python also got it right in a different way with whitespace.C and C++ really don't have an excuse for not MANDATING compiler warnings at a minimum. The use of lack of bracing is "I'm too lazy and much too cool to type 2 characters." This is major fuckup number 4,294,967,294 So that muppets who keep claiming "We need backwards compatibility with brittle and broken code." Should probably spend about a decade in the room full of mirrors HAVING A GOOD LONG, HARD LOOK AT THEMSELVES. (Caps used advisedly, in this case, we need to do a bit of yelling at these standards committee weenies refusing to, you know, fix the damn bugs in the standard).
Edit to point out this how how the NSA MITM'd you when you were using OSX, in case you missed what the file is too.