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>
This commit is contained in:
Michael Kerrisk 2019-06-08 08:09:45 +02:00
parent c0f8924419
commit ada54d9f2e
1 changed files with 1 additions and 1 deletions

View File

@ -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);