Messages in this thread | | | Date | Sun, 27 Jul 2003 15:26:20 -0600 (MDT) | Subject | Re: [ACPI] Re: [PATCH] bad strlcpy conversion breaks toshiba_acpi | From | "M. Warner Losh" <> |
| |
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/
| |