News for hackers. Stuff that matters.
Re:Goto fail by harry8 on Saturday February 22, 2014 @07:41AM (#7281904)
If you missed it the 35th and 36th occurance of goto fail that really does go directly to fail.

    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.

Re:Goto fail by exDM69 on Saturday February 22, 2014 @07:46AM (#7281921)
> If you missed it the 35th and 36th occurance of goto fail that really does go directly to fail.

Yes, I and many others seem to have missed it. That is a legitimate bug.

I think the post title should highlight this issue. Now it seems like it's just a "goto is bad but apple uses it anyway" post without much point.

Re:Goto fail by Gigablah on Saturday February 22, 2014 @08:08AM (#7281960)
It's kind of a pun (probably unintentional) in that there is a particular erroneous goto statement, i.e. a "goto fail".
Re:Goto fail by codeka on Saturday February 22, 2014 @07:43AM (#7281912)
> If you missed it the 35th and 36th occurance of goto fail that really does go directly to fail

Whoa, that was entirely unclear from the submission that this was the point. But then, I guess I still don't see what is the point. Why post this here and not file a bug or something?

Re:Goto fail by harry8 on Saturday February 22, 2014 @07:46AM (#7281924)
Not obvious is it. It's only ssl so it's not like it's important. The non-obviousness of it and the spectacularness of the goto fail is, well, in my view, the whole point. C should not still suck this bad. One line un-braced blocks are a standard bug. Why no fixy? Why? What do we have to do?
Re:Goto fail by tobiasu on Saturday February 22, 2014 @07:49AM (#7281932)
Re:Goto fail by mackwic on Saturday February 22, 2014 @07:48AM (#7281931)
Good catch ! Thanks for pointing that out.