Hacker News new | past | comments | ask | show | jobs | submit login

How about using programming language/number library that properly handles integer promotion or signals a condition when a number gets out of bounds. Obviously it's slower than unchecked processor integers, but as this story shows, in some circumstances it's well worth it.



Just validation of the input string would suffice. No need to use unsigned ints or promoted numerals.


Well, that's a start, but any subsequent math would involve numbers not directly entered by the user, so it's not sufficient by itself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: