strcat(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ”—


mwah πŸ’‹ β€” this little love letter is from the Kernel API Manual, source/version ./include/linux, dated October 2026. periodt. 🫢✨

πŸ“¦ where this page comes from