Mike Bland wrote an article about how testing culture could have caught the "goto fail" bug. He reduces the test down to its essence; you don't have to fight with some testing framework to set up this test. He talks about a way to structure code to make it easier to test. He talks about a culture in which that test would have arisen naturally—not in an after-the-disaster writeup.
It's Part 1 of what's going to be a multi-part article: Goto Fail, Heartbleed, and Unit Testing Culture.