Re: [PHP4BETA] moving uses of strncpy/cat to srtlcpy/cat?

From: Date: Wed, 15 Sep 1999 09:02:56 +0000
Subject: Re: [PHP4BETA] moving uses of strncpy/cat to srtlcpy/cat?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4468@lists.php.net to get a copy of this message
Sure. I think strlcat() is a Good Thing[tm], strncat() behaviour have always annoyed me. Where can I find an implementation we can use? - Stig On Tue, 14 Sep 1999, Joey wrote: | Isn't there some way we could bundle them with PHP, and if they are not | defined by the OS, use them? I really don't know about this stuff, I have | just had a long back-and-forth with Theo de Raadt & Ulrich Drepper, and | while Theo makes an excellent case, Ulrich is being stubborn (as is his | perogative, I guess). | | I was also considering approaching the Apache Group a/b the same thing, | but I am less intimidated by the PHP guys, as I feel I have gotten to know | you all...Rasmus, maybe you could mention strlcat/cpy to the rest of the | Apache guys?I know that Theo mentioned that they had created their own | workaround that was somewhat similar, but I think it'd be easier to get | glibc to support these functions if I could point at some major packages | that were using them? | | this is all speculation...I am just feeling my way around in the dark | here, but felt more comfortable approaching you guys than anyone else out | there...I started with Ulrich, 'cz that really is my end goal, to get | these into glibc, but are there things I don't know about in considering | moving to these functions? | | | --Joey Smith | | On Tue, 14 Sep 1999, Andi Gutmans wrote: | | > I think that in most ways strlcpy/strlcat are more intuitive than | > strncpy/strncat. It does seem as if they make it easier to use these string | > functions and that it really is harder to make mistakes with them. | > However, as you mentioned they are not standard and have not made it into | > glibc. | > The question is if there are any free general-purpose implementations which | > are still as fast or faster than strncpy/strncat. I can see the platform | > specific ones are faster but the question is if you can find a | > general-purpose one which is too. | > | > Andi | > | > At 04:55 PM 9/13/99 -0600, Joey wrote: | > >Are any of you familiar with strlcpy/cat as used in OpenBSD? | > >They are supposedly faster/safer versions of strncpy/cat... | > >make buffer overruns (impossible|less likely), and strlcat | > >does not zero fill as strncat does... | > > | > >Anyone think it would be good to use these? I tried to get | > >Ulrich Drepper (glibc maint.) to look into them for glibc, | > >but his attitude was "no one should ever use str*cat anyway, | > >and why do I need a new str*cpy?"...but Theo de Raadt (sp?) | > >makes a great argument _FOR_ them... | > > | > >http://www.openbsd.org/papers/strlcpy-paper.ps | > > | > >OR | > > | > >if you prefer PDF | > >http://www.xmission.com/~smit5898/strlcpy-paper.pdf | > > | > > --Joey Smith | > > | > > | > >-- | > >PHP 4 Beta | > | > --- | > Andi Gutmans <andi@zend.com> | > http://www.zend.com/ | > | | |

« previous php.version4 (#4468) next »