![Quote](https://cboard.cprogramming.com/images/misc/quote_icon.png)
Originally Posted by
Elysia
I'm not saying to use Microsoft functions. I'm saying to create your own safe functions that add security checks so that you don't commit to these mistakes.
That's why I said it would be nice is safe alternatives were added to the language (in the standard, of course).
This is completely unnecessary. 95% of memcpy calls can be done without checks simply by setting up the input and output correctly.
Please do not say "oh but what if I do this":
Code:
char buffer[16];
memcpy(buffer, something_else, 1000000);
That is JUST STUPID. TOO BAD. YOU LOSE. LEARN TO PROGRAM.
This is only a problem in "real world" settings like MS where economics and scale have made $$$ the priority, so quality of the product (and the people who produce it) is second seat to the quantity they can produce. That's what needs to be fixed.
Since it won't be, they can just make C# faster or something. Won't happen if half the underlying code is totally redundant safety checks, of course.