February 2014 Archives

Bugs in the compiler

After I posted my previous blog entry a couple of things were pointed out to me, to do with my fourth point about ignoring warnings.

It turns out that unreachable code doesn't necessarily produce warnings from Apple-ish compilers like I expected it to. It turns out that in gcc the -Wunreachable-code option doesn't do anything. It's only there because it used to do something but that functionality was removed because it didn't work very well. In Clang, -Wunreachable-code is functional, …

Lessons to learn from Apple

Apple's most recent iOS software update which fixes a horrible security flaw has been all over the interwebs recently. This is yet another post about it. Here's the buggy code:
static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
{
OSStatus err;
...

if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((e…

About David Cantrell

user-pic I'm in yur test resultz analyzn yr failz