|
|
|
|
|
by jjav
811 days ago
|
|
It is easy to document mistakes in hindsight, since hindsight is 20/20. It is very easy to write your own one-off secure string handling library. This is a common assignment in intro to C programming classes. So why isn't it standard in C already? You offer a theory that there is a gang of "security unconscious assholes [who] keep shutting it down". This gang is so well organized that they have managed to block an easy improvement for many many decades for unknown reasons. That's a pretty wild theory. Or Occam's razor suggests a different answer: It's actually difficult. No, not the writing code part, that's easy. It's the seamlessly integrating with ~60 years of mission critical codebases part that's hard. |
|
Nothing needs to be fixed, all it takes is to stop doing the stupid thing.
It does not take a "coordinated gang" to shut down C standard proposals, them getting shut down is the default.
You seem to be neither familiar with the nature of the problem or the struggle that is getting anything passed through ISO standardization. I don't mean to belittle you by saying this, I just hope to make you understand that you are assuming things that are simply not based in reality.
It doesn't even need to be in the standard btw. Just write your own. It's a few lines of code. As you say, a beginner exercise. Yet there is code written after the year 2000 that still uses the strxcpy family. Long after the issues have been known and what the solution is.
"Backwards compatibility" is a total red herring. C++ has the solution right there in its standard library. A backwards compatible string buffer implementation.