Le 30/10/2018 à 13:38, Adam Borowski a écrit :
In that case, memcpy() is strictly better:
* faster:
+ no need to compare every byte
+ can copy longer strings a word at a time
* safer: you don't get the false impression it'd null-terminate the string
for you
Wether the function is
On Tue, Oct 30, 2018 at 11:01:15AM +0100, Didier Kryn wrote:
> Le 29/10/2018 à 22:42, Adam Borowski a écrit :
> > Well, it is possible to use strcpy() right. On the other hand, _every_ use
> > of strncpy() for a C string is a bug.
>
> Let's assume "the programmer knows what she is doing"
Le 29/10/2018 à 22:42, Adam Borowski a écrit :
On Mon, Oct 29, 2018 at 01:28:02PM -0700, Rick Moen wrote:
Quoting Daniel Taylor (ran...@argle.org):
They do, but that's not an excuse for using strcpy().
Which they did.
Of course, obviously. You _are_ aware I was merely trying to help by
Hi,
On 10/29/2018 09:37 PM, Daniel Abrecht wrote:
On 27/10/2018 19.38, Steve Litt wrote:
I say: You must use strncpy()/strncat() because strcpy()/strcat() are
soo old.
What's it been now, 30 years since the strn versions of those
commands have been around? You'd think they'd have
On Mon, Oct 29, 2018 at 01:28:02PM -0700, Rick Moen wrote:
> Quoting Daniel Taylor (ran...@argle.org):
>
> > They do, but that's not an excuse for using strcpy().
> >
> > Which they did.
>
> Of course, obviously. You _are_ aware I was merely trying to help by
> pointing out that strncpy (etc.)
On 27/10/2018 19.38, Steve Litt wrote:
I say: You must use strncpy()/strncat() because strcpy()/strcat() are
soo old.
What's it been now, 30 years since the strn versions of those
commands have been around? You'd think they'd have taken that in and
adopted it by now. But
Quoting Daniel Taylor (ran...@argle.org):
> They do, but that's not an excuse for using strcpy().
>
> Which they did.
Of course, obviously. You _are_ aware I was merely trying to help by
pointing out that strncpy (etc.) is suboptimal, right?
> Helper libraries are awesome, as long as they
On 10/29/18 2:59 PM, Rick Moen wrote:
FWIW, strncpy()/strncat() were a huge advance over strcpy()/strcat(),
but also have their own problems:
https://blog.liw.fi/posts/strncpy/
https://www.reddit.com/r/programming/comments/ifje6/strncpy_just_say_no/
They do, but that's not an excuse for using
Quoting Dave Turner (dave_t_tur...@barradas.free-online.co.uk):
> >>I say: You must use strncpy()/strncat() because strcpy()/strcat() are
> >> soo old.
> I still have a copy of the paper that brought strncpy / strncat to
> the world's attention all those years ago.
FWIW,
On 10/27/18 2:38 PM, Steve Litt wrote:
On Sat, 27 Oct 2018 14:24:22 +0200
info at smallinnovations dot nl wrote:
Not my words although i agree fully with them:
https://www.theregister.co.uk/2018/10/26/systemd_dhcpv6_rce/
"The overflow can be triggered relatively easy by advertising a DHCPv6
On Sat, 27 Oct 2018 14:24:22 +0200
info at smallinnovations dot nl wrote:
> Not my words although i agree fully with them:
> https://www.theregister.co.uk/2018/10/26/systemd_dhcpv6_rce/
"The overflow can be triggered relatively easy by advertising a DHCPv6
server with a server-id >= 493
Not my words although i agree fully with them:
https://www.theregister.co.uk/2018/10/26/systemd_dhcpv6_rce/
Grtz.
Nick
signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
12 matches
Mail list logo