From 3620c4ee677224aed6d6fa02aa8d034b4495370e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 6 Feb 2026 22:56:16 +0100 Subject: vi: fix "s /find/repl" with whitespace before / function old new delta colon 3977 4005 +28 Signed-off-by: Denys Vlasenko --- include/libbb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index 6ce01ea94..baf0f29e5 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -939,6 +939,8 @@ int parse_pasv_epsv(char *buf) FAST_FUNC; /* 0 if argv[0] is NULL: */ unsigned string_array_len(char **argv) FAST_FUNC; void overlapping_strcpy(char *dst, const char *src) FAST_FUNC; +/* Like strncpy but make sure the resulting string is always 0 terminated: */ +/* writes SIZE chars, the [SIZE-1] char is always NUL (unless SIZE==0). */ char *safe_strncpy(char *dst, const char *src, size_t size) FAST_FUNC; char *strncpy_IFNAMSIZ(char *dst, const char *src) FAST_FUNC; unsigned count_strstr(const char *str, const char *sub) FAST_FUNC; -- cgit v1.2.3-55-g6feb