[Cryptography] GnuTLS -- time to look at the diff.

Peter Gutmann pgut001 at cs.auckland.ac.nz
Sat Mar 8 06:44:42 EST 2014

dan at geer.org writes:

>slight detour: I remember once reading that good code had, in round numbers,
>40% of its volume in error handling.  Can't remember where I read it, but I
>asked one of the big static analysis firms if they had any data.  They
>didn't, but thought that going forward they could.  It would be an
>interesting figure to be sure.

It's also a scary figure, because error-handling code is the code that almost
never gets tested.  A friend of mine once took a widely-used software security
tool and ran its test suite inside a wrapper that on successive runs made the
first malloc fail, the second malloc fail, and so on, a simple but effective
way of exercising quite a lot of error-handling code paths.  It was lucky that
he hard-limited the number of coredumps to 10,000 before he ran it...


More information about the cryptography mailing list