aboutsummaryrefslogtreecommitdiff
path: root/libbb/safe_strncpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/safe_strncpy.c')
-rw-r--r--libbb/safe_strncpy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c
index 2016e6b52..d4275698c 100644
--- a/libbb/safe_strncpy.c
+++ b/libbb/safe_strncpy.c
@@ -25,7 +25,7 @@
25 25
26 26
27/* Like strncpy but make sure the resulting string is always 0 terminated. */ 27/* Like strncpy but make sure the resulting string is always 0 terminated. */
28extern char * safe_strncpy(char *dst, const char *src, size_t size) 28char * safe_strncpy(char *dst, const char *src, size_t size)
29{ 29{
30 dst[size-1] = '\0'; 30 dst[size-1] = '\0';
31 return strncpy(dst, src, size-1); 31 return strncpy(dst, src, size-1);