by ape4 · 4y ago · 0 comments
If argc is 0, don't look at argv.
Sanity check argv != NULL before looking at it.
Or, maybe write security-critical programs in safer languages like Rust.
People out there write some pretty funky C.
If you're writing a serious kernel in C, you ought to have programmatic debugging assertion constraints for every parameter.