Re:Reddit's photo albums broke due to Integer overflow of Si...
by Gigachad on Tuesday December 13, 2022 @06:38PM
(#33977904)
For some reason most stuff still defaults to i32 and a lot of people use them for new code. At this point I'd not be against linters warning against using 32 bit ints unless you have a good reason.
[ Parent
| on HN ]
Re:Reddit's photo albums broke due to Integer overflow of Si...
by bushbaba on Tuesday December 13, 2022 @06:52PM
(#33978026)
My alma maters vending machines used an unsigned integer for understanding school debt card balance. However the school debt card used a signed integer to allow for small negative balances.
Well students uncovered the flaw and had their cards be at negative 1 dollar, which the vending machine read as a very large balance.
Re:Reddit's photo albums broke due to Integer overflow of Si...
by kuroguro on Wednesday December 14, 2022 @01:18PM
(#33987460)
What I don't get is why you'd want a signed int for an id.
Re:Reddit's photo albums broke due to Integer overflow of Si...
by thegeomaster on Wednesday December 14, 2022 @04:13AM
(#33981494)
They're still a good choice for most perf critical code due to the reduced memory use.