Wow what an excellent question and answer. Remember the random number bug found in the Bitcoin Android App? Some one joked that the code for the Android random number generator was:
int randomNumber()
{
return 4;
};
This is what you are referring to:
The Android situation was not this, but it was almost as bad.