Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
yetihehe
5y ago
0 comments
Share
Yay for errors, it should be memcpy(dst, src, strlen(src)+1). Strlen doesn't count last 0. If your dst is not zeroed already you will have unterminated string.
undefined | Better HN
0 comments
default
newest
oldest
commandlinefan
5y ago
Should have let me use strncpy then, shouldn't you? ; P
j
/
k
navigate · click thread line to collapse