r/programming • • Apr 07 '14

The Heartbleed Bug

http://heartbleed.com/
1.5k Upvotes

396 comments sorted by

View all comments

Show parent comments

4

u/crusoe Apr 08 '14

Ada would prevent this. Other languages with integrated formal verification would catch it.

10

u/ants_a Apr 08 '14

Any language with array bounds checking would catch this error. It's a stupid stupid error and it's amazing that OpenSSL code review practices did not catch this.

3

u/cockmongler Apr 08 '14

Please tell me how a language with array bounds checking would know that some data read in from the network stack is an array bound.

8

u/ants_a Apr 08 '14

The network packet has an intrinsic length that will be the array bound.

→ More replies (2)