In other words, the correct way to use strncpy is
Which, by the way, makes MS's strcpy_s misdesigned. But we knew that.Code:strncpy(dest, src, min(dest_size, src_size));
In other words, the correct way to use strncpy is
Which, by the way, makes MS's strcpy_s misdesigned. But we knew that.Code:strncpy(dest, src, min(dest_size, src_size));
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law