diff options
| author | Alejandro Colomar <alx@kernel.org> | 2022-12-04 23:49:08 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2022-12-04 23:49:08 +0100 |
| commit | 413180217085dcb45ddf756511be7ad1e681cec0 (patch) | |
| tree | d0bbc630a145f775314b70177f2e083daedf9798 | |
| parent | 0236da4ad36e739b4996850e29ff927d79809ba2 (diff) | |
| download | man-pages-413180217085dcb45ddf756511be7ad1e681cec0.tar.gz | |
strncpy.3: CAVEATS: It can't detect truncation
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man3/strncpy.3 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/man3/strncpy.3 b/man3/strncpy.3 index 2f99138795..7587c036fd 100644 --- a/man3/strncpy.3 +++ b/man3/strncpy.3 @@ -105,6 +105,13 @@ interprocess communication technique). has a misleading name. It doesn't produce a (null-terminated) string; and it should never be used for producing a string. +.PP +It can't detect truncation. +It's probably better to explicitly call +.BR bzero (3) +and +.BR memccpy (3), +since that allows detecting truncation. .SH SEE ALSO .BR bzero (3), .BR memccpy (3), |
