General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lepi Doptera
Low Level
comments
Comments by "Lepi Doptera" (@lepidoptera9337) on "new Linux feature makes hacking IMPOSSIBLE" video.
Among other things. C is a language that allows you to do absolutely everything that can be done on the machine. That's by design. It would be impossible to write operating systems and drivers without this feature. With that power comes a lot of responsibility. It is entirely possible to write generic C programs that do not have buffer overflows and similar problems. All one has to do is to write safe array, buffer etc. libraries that all programmers have to use by edict. There are two problems with that approach: 1) It is not trivial to guarantee the safety of such a library under all circumstance (but it can be done) and 2) It costs performance. In the past that performance problem was so severe that programmers would prefer to write their own performance optimized routines, which were, of course, not safe (omitting an expensive safety check by choice automatically leaves a security hole and it's one that hackers can probably predict even if they don't have the source code). I would argue that this is not the case any longer because most CPUs are memory IO limited and they do have the spare cycles for safety checks in most practical situations.
1
@ It's not a rhetorical question in practice. We always have to chose between competing engineering goals. And, yes, I had C programs crash on me because I made assignments between incompatible types ON PURPOSE. Writing 32/64/128 bits on machines with wide busses is way more efficient than byte wide IO. It's also way more tricky.
1
@haroldwilson4152 I have stopped worrying about the small stuff. I am now much more focused on important things, like giving the user an "undo/redo" ability and automatic backups. It doesn't matter that the software is perfect if it doesn't serve the user and protect the data.
1