Hacker News new | ask | show | jobs
by aaronbrager 2541 days ago
That’s what secure coding guidelines say to do. It’s called “input validation”. For example here’s Apple’s: https://developer.apple.com/library/archive/documentation/Se...

Especially important on methods called on launch, if a crash would cause a problem.

(Swift or other strongly typed language would help here.)

1 comments

The halting problem's existence means that there's no input validation that is guaranteed to work absolutely 100% of the time though, for sufficiently large inputs.