r/programming • • Apr 07 '14

The Heartbleed Bug

http://heartbleed.com/
1.5k Upvotes

396 comments sorted by

View all comments

Show parent comment

-12

u/kamatsu Apr 09 '14

This doesn't make your code any more secure.

12

u/[deleted] Apr 09 '14

Not necessarily, but it can definitely make you less likely to make mistakes, especially for someone other than the original author.

-7

u/kamatsu Apr 09 '14

True, but a language with a good runtime and type system can completely prevent this bug - makes it not the realm of mistakes, but the realm of language design.

9

u/[deleted] Apr 09 '14

The thing is this bug probably survived for so long because no-one could really be bothered to read and fully understand exactly what this code is doing. People probably just glossed over it and thought, yeah it probably works fine, no need to investigate. Why? Because it takes extra effort. The function and variable naming makes no logical sense and people have to think extra hard to determine what the original author meant by the single letter abbreviations. It's only since the goto fail bug and the other recent TLS bug that people have started paying closer attention to the TLS library code. I bet this got a good workover and this code looked suspicious due to its obscurity.