diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3 index 9a1f2d5bfff9..0ff3ad77dc69 100644 --- a/lib/libc/stdtime/strftime.3 +++ b/lib/libc/stdtime/strftime.3 @@ -66,13 +66,19 @@ and one other character. .Pp No more than .Fa maxsize -characters will be placed into the array. +characters will be placed into the array. If more characters than +.Fa maxsize +could have been written into +.Fa buf +then +.Fa bug +will not be NUL terminated. If the total number of resulting characters, including the terminating -null character, is not more than +NUL character, is not more than .Fa maxsize , .Fn strftime returns the number of characters in the array, not counting the -terminating null. +terminating NUL. Otherwise, zero is returned. .Pp Each conversion specification is replaced by the characters as