aboutsummaryrefslogtreecommitdiffstats
path: root/man3/strcat.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2019-06-08 08:09:45 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2019-06-08 08:09:45 +0200
commitada54d9f2e9c55a0a0d3dcc95ee2fdf6ec9af8dc (patch)
tree60baafaf8bcce6735d1988737d0253d483945cd5 /man3/strcat.3
parentc0f892441993cdd3ae499950095e4824a9dc909f (diff)
downloadman-pages-ada54d9f2e9c55a0a0d3dcc95ee2fdf6ec9af8dc.tar.gz
strcat.3: Fix off-by-one error in example code
Reported-by: Eric Sanchis <eric.sanchis@iut-rodez.fr> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/strcat.3')
-rw-r--r--man3/strcat.32
1 files changed, 1 insertions, 1 deletions
diff --git a/man3/strcat.3 b/man3/strcat.3
index 7d0998fc12..9263c7ec93 100644
--- a/man3/strcat.3
+++ b/man3/strcat.3
@@ -209,7 +209,7 @@ main(int argc, char *argv[])
{
#define LIM 4000000
int j;
- char p[LIM];
+ char p[LIM + 1]; /* +1 for terminating null byte */
time_t base;
base = time(NULL);