Comment Comment by bio_end_io_t The author should've been wary of strncpy, because his solution is wrong."If there is no null byte among the first n bytes of src, the string placed in dest will not be null-terminated."So copying sizeof(dest)-1 will not append a NULL byte as the author implies. You'll have to do that manually. parent bio_end_io_t 8 years ago
"If there is no null byte among the first n bytes of src, the string placed in dest will not be null-terminated."
So copying sizeof(dest)-1 will not append a NULL byte as the author implies. You'll have to do that manually.