public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "M. Warner Losh" <imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
To: willy-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org
Cc: aebr-ek1Qb6IBo2Pz+pZb47iToQ@public.gmane.org,
	vandrove-hnqZr3NxcozrBKCeMvbIDA@public.gmane.org,
	jvb-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org,
	bcollins-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org,
	torvalds-3NddpPZAyC0@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	gan-28sE0Wxkf/LCXR85Y8Hu3Q@public.gmane.org
Subject: Re: Re: [PATCH] bad strlcpy conversion breaks toshiba_acpi
Date: Sun, 27 Jul 2003 15:26:20 -0600 (MDT)	[thread overview]
Message-ID: <20030727.152620.127108646.imp@bsdimp.com> (raw)
In-Reply-To: <20030727210203.GU1485-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>

In message: <20030727210203.GU1485-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
            Matthew Wilcox <willy-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org> writes:
: On Fri, Jul 25, 2003 at 06:57:09PM +0200, Andries Brouwer wrote:
: > strlcpy is for strings, not for character arrays.
: > The *BSD version accesses the source past the size-1 characters
: > that are copied: 
: > 	while (*s++)
: > 		;
: > Thus, replacing strncpy (used to copy character arrays, possibly
: > not 0-terminated) by strlcpy is wrong.

Ah, that's to get the silly return value correct :-(.

Warner


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

      parent reply	other threads:[~2003-07-27 21:26 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
     [not found] ` <3F2142CE.4090608-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org>
2003-07-25 16:15   ` Petr Vandrovec
     [not found]     ` <20030725161510.GA31565-Kr4v8scruuLwY2GEPTd/bA@public.gmane.org>
2003-07-25 16:57       ` Andries Brouwer
     [not found]         ` <20030725165709.GA670-ek1Qb6IBo2Pz+pZb47iToQ@public.gmane.org>
2003-07-27 21:02           ` Matthew Wilcox
     [not found]             ` <20030727210203.GU1485-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
2003-07-27 21:26               ` M. Warner Losh [this message]

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=20030727.152620.127108646.imp@bsdimp.com \
    --to=imp-uztcj5rojnnqt0dzr+alfa@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=aebr-ek1Qb6IBo2Pz+pZb47iToQ@public.gmane.org \
    --cc=bcollins-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org \
    --cc=gan-28sE0Wxkf/LCXR85Y8Hu3Q@public.gmane.org \
    --cc=jvb-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=torvalds-3NddpPZAyC0@public.gmane.org \
    --cc=vandrove-hnqZr3NxcozrBKCeMvbIDA@public.gmane.org \
    --cc=willy-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org \
    /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