|
|
Subscribe / Log in / New account

Adding strlcpy() to glibc

Adding strlcpy() to glibc

Posted Sep 18, 2014 10:41 UTC (Thu) by gb (subscriber, #58328)
Parent article: Adding strlcpy() to glibc

And what if Ulrich is right and it's bad idea to include that functions into glibc - his reasons to not bloat glibc with something that encourages wrong design sounds like good idea.

14 years of the patch existence doesn't mean that idea behind the patch is good. Either that some programs use same function makes that function good design. And neither make such patch a shiny "new feature".

It's not that black and white as it is in article - Ulrich's articles are very good and glibc is excellent piece of software. Yes, he is rude and didn't want to spend a time to politely decline things which won't match - but that doesn't mean that reasons are inappropriate.


to post comments

Adding strlcpy() to glibc

Posted Sep 18, 2014 19:03 UTC (Thu) by vomlehn (guest, #45588) [Link]

If the patch was out there for fourteen years and nobody else developed the functionality, you'd be right. But people keep reimplementing the functions, so the choice is not between implementing it or not, but between implementing it as well as it can be, once, or having a zillion bad implementations. This is just sane engineering.

Convincing people to use another approach is a whole different issue and becomes a mixture of engineering and religion. Witness the rest of the discussion.

Adding strlcpy() to glibc

Posted Sep 24, 2014 22:37 UTC (Wed) by lally (subscriber, #71211) [Link]

To minimize damage:
  1. Put as safe a ersion of strlcpy() in glibc as you can, to avoid the use of less-safe versions.
  2. In the manual page, put in all the reasons not to use it, and good guidance on what to use instead.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds