Skip to content

Comment on Reflections on Curly Braces – Apple’s SSL Bug and What We Should Learn From Itparent

Comments

Looking at the diff between the two versions released by apple http://opensource.apple.com/source/Security/Security-55471/l... and http://opensource.apple.com/source/Security/Security-55179.1...

the only thing that changed in the relevant part was that "goto fail;" was added.

  @@ -627,6 +628,7 @@
           goto fail;
       if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
           goto fail;
  +        goto fail;
       if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
           goto fail;
this makes a copy & paste error highly unlikely.

I've done that type of copy/paste error - inadvertently duplicating a line - more than once when using an unfamiliar and "helpful" IDE. I hate it when an IDE screen flashes and I'm left wondering what the HELL did that just do???

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.