From: Folkert van Heusden <folkert@vanheusden.com>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: Willy Tarreau <w@1wt.eu>, linux-kernel@vger.kernel.org
Subject: Re: strncpy optimalisation? (lib/string.c)
Date: Sun, 10 Dec 2006 22:49:54 +0100 [thread overview]
Message-ID: <20061210214954.GG30197@vanheusden.com> (raw)
In-Reply-To: <20061210220507.GE47959@gaz.sfgoth.com>
> > This one (tested in test-code seperate from kernel) works:
> No it doesn't!
> strncpy() guarantees that the entire destination buffer is written to.
> If you call
> strncpy(dest, "foo", 10000)
> then you MUST write to 10000 bytes of memory, or your strncpy() is buggy.
> Your patches basically turn strncpy() into strlcpy(). Don't do that.
> They're separate functions for a reason.
Yes I saw that, didn't read your e-mail before I read Willy's message.
Can you please also have a look at my strlcpy patch?
Folkert van Heusden
--
www.vanheusden.com/recoverdm/ - got an unreadable cd with scratches?
recoverdm might help you recovering data
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
next prev parent reply other threads:[~2006-12-10 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-10 20:52 Folkert van Heusden
2006-12-10 21:06 ` Willy Tarreau
2006-12-10 21:35 ` Folkert van Heusden
2006-12-10 22:05 ` Mitchell Blank Jr
2006-12-10 21:49 ` Folkert van Heusden [this message]
2006-12-10 21:49 ` Mitchell Blank Jr
2006-12-10 21:39 ` Folkert van Heusden
2006-12-10 23:28 ` Bernd Petrovitsch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061210214954.GG30197@vanheusden.com \
--to=folkert@vanheusden.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mitch@sfgoth.com \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®