2 ms·
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.
by yetihehe 6y ago
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.
- commandlinefan 6y agoShould have let me use strncpy then, shouldn't you? ; P