mpage/misc — comment on commit 08eb0373fbf3de30a33273f2d8cae30470da907e
File: report_quota.c line 44
By jstultz:

You can make the argument that using strncpy here is unnecessary; generally the reason strcpy is avoided is because it depends on there being a NULL terminator somewhere in the string, which may not necessarily be the case. However, since the length you're passing into strncpy was determined with strlen, you don't avoid that by using strncpy. Also, strncpy in general also has the issue that it doesn't NULL terminate the destination string if the specified length is shorter than the source string. I think in general strncat is better for 'safe' string copying that strncpy.