strcpy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– strcpy(9) β€” straight from the Kernel API Manual, bestie πŸ’–

🌸 NAME 🌸

strcpy β€” copy a string into another string buffer. That's the whole vibe, okay?

✨ SYNOPSIS ✨

char * strcpy (char * const p , const char * const q );

πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” pointer to destination of copy. That's where the string is going, bestie.
  • q β€” pointer to NUL-terminated source string to copy. NUL-terminated, not vibe-terminated.

πŸ’… DESCRIPTION πŸ’…

🚨 Do not use this function. 🚨 Like, seriously, bestie. This is not the one.

While FORTIFY_SOURCE tries to avoid overflows, this is only possible when the sizes of q and p are known to the compiler. So yeah, it's giving β€œprotection with conditions,” not a free pass.

Prefer strscpy, though note its different return values for detecting truncation. That part matters, so don't just swap it in and call it a day.

Returns p. Yep, that's the whole return situation. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹


Okay that's the strcpy(9) page, bestie β€” source/version ./include/linux, dated October 2026. Slay, stay safe, and maybe use strscpy. πŸ’–βœ¨

πŸ“¦ where this page comes from