archive mirror
 help / color / mirror / Atom feed
From: Petr Vandrovec <>
To: John Belmonte <>
Cc: Ben Collins <>,
	Linus Torvalds <>,,,
	Michael Wawrzyniak <>
Subject: Re: [PATCH] bad strlcpy conversion breaks toshiba_acpi
Date: Fri, 25 Jul 2003 18:15:10 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Jul 25, 2003 at 10:46:38AM -0400, John Belmonte wrote:
> Please revert the following item from Ben Collins' "drivers/* strlcpy 
> conversions" patch dated 2003-May-26.
> The strlcpy function requires a zero-terminated string, which is not a 
> valid assumption for the code in question.  I suggest that Ben review 
> all such modifications he made to the kernel for similar errors.  It's 
> quite annoying to have someone add bugs to your driver while you're not 
> looking.  Either notify the maintainer of your patch or don't make mistakes.

Nope. Kernel strlcpy implementation is crap and I do not believe that there
is single place in the kernel which can live with current implementation. 

Take a look at 
or at - it copies
at most size-1 characters. Nothing about characters beyond specified size 
in the article.

Kernel should use strnlen() to get string length, if coding loop like
OpenBSD does is unacceptable.
						Best regards,
							Petr Vandrovec

  reply	other threads:[~2003-07-25 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-25 14:46 [PATCH] bad strlcpy conversion breaks toshiba_acpi John Belmonte
2003-07-25 16:15 ` Petr Vandrovec [this message]
2003-07-25 16:57   ` Andries Brouwer
2003-07-27 21:02     ` [ACPI] " Matthew Wilcox
2003-07-27 21:26       ` M. Warner Losh

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).