4 ms·
>So, you create something that does not fulfill the C library invariant of what constitutes a "string", and then pass it to a copy function that assumes this in
by pretoriusB 14y ago
>So, you create something that does not fulfill the C library invariant of what constitutes a "string", and then pass it to a copy function that assumes this invariant? It isn't a fair thing to do
Well, life as a program is not fair either.
The problem is your function can be used in many contexts, including by other people. You should not expect them to be fair, you should make your function robust.