5 ms·
"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
by shawndumas 10y ago
"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
- eridius 10y agoMore likely to be underflow. -296, when interpreted as an unsigned 32-bit integer, is 4294967000, which exactly matches the balance the person was seeing.
- SamReidHughes 10y agoUnderflow is when a nonzero floating point number is too small to be represented.
- Waterluvian 10y agoThanks for sharing. Didn't know that. Always thought it was as suggested above: you loop around by going negative.
- eridius 10y agoOverflow 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?
- SamReidHughes 10y agoIt is forbidden! You must not speak of it.
- banhfun 10y agoI'd be really surprised if an app like Skype could overlook such a simple bug.
- stouset 10y agoAnd yet here we are.
- CaptSpify 10y agoWait, really? Have you used the same Skype that I've been using?
- nom 10y agoI 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.
- computerex 10y agoSkype wasn't originally written by Microsoft, so who knows how the code looks like. I know the linux client was god awful.
- nom 10y agoBTW, 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.
- aedron 10y agoSkype was developed by an outsourced team in Estonia.