Nice analysis of the Apple security bug on Slate.
Preventing bugs like these is one of the biggest challenges of software engineering, and this incident should make it pretty damn clear why. A single extra line of code compromised the security of millions and millions, and no one caught it for more than a year.
The obvious question is: why no unit tests?