From: Alejandro Colomar Date: Mon, 5 Dec 2022 15:09:47 +0000 (+0100) Subject: strcat.3: SYNOPSIS: Fix the size of 'dest' X-Git-Tag: man-pages-6.02~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c19ad66c8e990a46d4e4d4daff8002a7a584431;p=thirdparty%2Fman-pages.git strcat.3: SYNOPSIS: Fix the size of 'dest' I had a mistake when adding VLA syntax to this prototype. From this fixed prototype, it's visible how broken the design for this function is. Next move is to kill this function. Cc: Signed-off-by: Alejandro Colomar --- diff --git a/man3/strcat.3 b/man3/strcat.3 index a4a376ba9e..61d3e54f18 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -20,9 +20,8 @@ Standard C library .B #include .PP .BI "char *strcat(char *restrict " dest ", const char *restrict " src ); -.BI "char *strncat(char " dest "[restrict ." n "], \ -const char " src "[restrict ." n ], -.BI " size_t " n ); +.BI "char *strncat(char " dest "[restrict strlen(." dest ") + strnlen(." n ") + 1]," +.BI " const char " src "[restrict ." n "], size_t " n ); .fi .SH DESCRIPTION The