Hacker News new | ask | show | jobs
by codedokode 16 days ago
Overflows are dangerous by itself. Assume you keep the order total price as uint32. Someone orders a spaceship for 2.2B credits, and then adds another one which is not an expected scenario. The total counter overflows and now you have sold 2 expensive spaceships at 99% discount.
1 comments

Yes, that is bad. No one is saying that all bugs require memory unsafety.