"I'm guessing unsigned integer overflow. The range of an unsigned 32 bit number is 4,294,967,295. If their base unit is pennies, that's 42M."
--rouverius
More likely to be underflow.
-296, when interpreted as an unsigned 32-bit integer, is 4294967000, which exactly matches the balance the person was seeing.
Underflow is when a nonzero floating point number is too small to be represented.
Thanks for sharing. Didn't know that. Always thought it was as suggested above: you loop around by going negative.
Overflow is generation of numbers that are too large. If I can't use "underflow" to mean trying to go negative with an unsigned integer, then what term am I supposed to use?
It is forbidden! You must not speak of it.
I'd be really surprised if an app like Skype could overlook such a simple bug.
And yet here we are.
Wait, really? Have you used the same Skype that I've been using?
I remember a discussion on HN (I think) about the Skype windows client, where an ex-dev told tales about how horrible their code base is. It sounded like an engineers nightmare. They also employ(ed?) several obfuscation techniques and stuff like runtime memory encryption, just to 'protect' their protocol from being reverse engineered. I can imagine that things didn't improve much over the last decade and that their Android/iOS app doesn't look much better internally.
Skype wasn't originally written by Microsoft, so who knows how the code looks like. I know the linux client was god awful.
BTW, the old linux client (dating back to 2014) still exists and can be downloaded from the official site. It only supports text messages and files, and the messages don't show up in other clients for some reason as if they are not stored in the server side log. Can't explain that one.
Skype was developed by an outsourced team in Estonia.
Can you ask for a refund? :)
Convert to BTC in small increments and head to a non-Interpol country. ;)
It's just... fractions of a penny.
If MS/Skype have bug bounties, there might be money to be made in determining the cause.
Are you able to spend more than the $.20 you deposited?
Maybe if he spent over $.20 his actual balance would overflow to 42M. Just imagine that (and how poor their programming would have to be)!