Re: [ACPI] Re: [PATCH] bad strlcpy conversion breaks toshiba_acpi

From: M. Warner Losh (imp@bsdimp.com)
Date: Sun Jul 27 2003 - 16:26:20 EST


In message: <20030727210203.GU1485@parcelfarce.linux.theplanet.co.uk>
            Matthew Wilcox <willy@debian.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:33 EST