Re:Memory Safety in Rust: A Case Study with C
by reza_n on Saturday February 03, 2018 @03:43PM
(#16299528)
I would argue the opposite, assert() statements are the best way to write defensive and secure C. There might have been a time when people commonly compiled out assert() statements from binaries, but that is only OK if the software was designed for that. Otherwise, that would be like me saying I am going to compile out all strlen() statements from a given binary and then expect it to behave the same.
[ Parent
| on HN ]
Re:Memory Safety in Rust: A Case Study with C
by irundebian on Sunday February 04, 2018 @08:30AM
(#16302659)
Secure code should be correct and robust. To assure correctness assert()'s should be used, to assure robustness you should check return values and buffer sizes.