Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Glibc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Secure string functions === glibc does not implement bounds-checking interfaces defined in [[C11 (C standard revision)|C11]] and did not implement strlcpy and strlcat<ref>{{Cite web |last=Kerrisk |first=Michael |title=The ups and downs of strlcpy() |url=https://lwn.net/Articles/507319/ |access-date=2023-12-09 |website=[[LWN.net]] |archive-date=9 December 2023 |archive-url=https://web.archive.org/web/20231209152233/https://lwn.net/Articles/507319/ |url-status=live }}</ref><ref>{{Cite web |last=Corbet |first=Jonathan |title=Adding strlcpy() to glibc |url=https://lwn.net/Articles/612244/ |access-date=2023-12-09 |website=[[LWN.net]] |archive-date=9 December 2023 |archive-url=https://web.archive.org/web/20231209152233/https://lwn.net/Articles/612244/ |url-status=live }}</ref> until 2023 on the grounds that "in practice these functions can cause trouble, as their intended use encourages silent data truncation, adds complexity and inefficiency, and does not prevent all buffer overruns in the destinations."<ref name=":2">{{Cite web |title=FAQ |url=https://sourceware.org/glibc/wiki/FAQ#Why_no_strlcpy_.2F_strlcat.3F |access-date=2023-12-09 |website=sourceware.org |archive-date=9 December 2023 |archive-url=https://web.archive.org/web/20231209151431/https://sourceware.org/glibc/wiki/FAQ#Why_no_strlcpy_.2F_strlcat.3F |url-status=live }}</ref> The FAQ pointed out that the bounds-checking interfaces were optional in the ISO standard and that snprintf was available as an alternative.<ref name=":2" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)