Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
yetihehe
5y ago
0 comments
Save
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.
0 comments
1 comments · 1 top-level
top
newest
oldest
commandlinefan
5y ago
Should have let me use strncpy then, shouldn't you? ; P
j
/
k
navigate · click thread line to collapse