2 ms·
It copies the null from the input string. It maintains the string invariant without silently corrupting data. Writing C code with well-defined semantics in th
by hedora 10y ago
It copies the null from the input string. It maintains the string invariant without silently corrupting data.
Writing C code with well-defined semantics in the face of existing heap corruption is harder. The strn* functions don't do that either though.