Updated: Would your database accept $23 quadrillion?

UPDATED: The Consumerist reported (h/t BoingBoing) that a teenager managed to charge $23,148,855,308,184,500.00 to a prepaid VISA BUXX card at a CVS drug store.

How could that happen?


A poster to Slashdot believes they understand the immediate cause of the problem.

“What is interesting is that the amount charged actually reveals the type of programming error that caused the problem. 23,148,855,308,184,500.00 * 100 (I’m guessing this is how the number is actually stored) is 2314885530818450000. Convert 2314885530818450000 to hexadecimal, and you end up with 20 20 20 20 20 20 12 50. Most C/C++ programmers see the error now … hex 20 is a space. So spaces were stuffed into a field where binary zero should have been.”

But that still doesn’t explain everything. Databases should have common sense limits on fees and charges. Consumerist noted that the database did do one thing right: it added a $20 “negative balance” fee.

The teen’s parent, “Dale,” had a sense of humor about the incident, writing to Consumerist, “My lectures about financial responsibility appear to have failed.”

“That’s 2,000 times more than the national debt, which is a paltry 11 trillion,” Dale added.

News Around the Web