strcat(9)
π strcat(9) π
okay so this page is from the Kernel API Manual, and it's about strcat(9) β the βappend a string to an existing stringβ function. Cute concept, but the manpage has opinions. π
π NAME π
strcat β Append a string to an existing string
β¨ SYNOPSIS β¨
the signature, untouched, because we do not mess with code bestie:
char * strcat (char * const p , const char *q );
πΈ ARGUMENTS πΈ
pβ pointer to NUL-terminated string to append to. this is the destination string you're adding onto, bestie.qβ pointer to NUL-terminated source string to append from. this is where the extra characters are coming from.
π¨ DESCRIPTION π¨
okay bestie, real talk:
π¨ Do not use this function. π¨
the way that FORTIFY_SOURCE tries to avoid read and write overflows is iconic, but this is only possible when the destination buffer size is known to the compiler. Prefer building the string with formatting, via scnprintf or similar. At the very least, use strncat. fr fr, do not play with this one. π
and yes β it Returns p. that's the return value, no cap. π«Ά
π SEE ALSO π
- Kernel file
./include/linux/fortify-string.hβ the fortify-string girlie, highly relevant unsafe_memcpy(9)strnlen(9)strlen(9)strlcat(9)strncat(9)strcpy(9)
mwah π β this little love letter is from the Kernel API Manual, source/version ./include/linux, dated October 2026. periodt. π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms