Comment by zbuf
2 years ago
Interesting to see the implementation is basically a two-pass process: strlen() to count the source string, followed by a memcpy().
My intuition would be to give some importance to not looping on the source string radically beyond the length of the destination buffer.
https://sourceware.org/git/?p=glibc.git;a=blob;f=string/strl...
No comments yet
Contribute on Hacker News ↗