Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <023c0194641abe411c2338e4eed9eec876888e48.camel@perches.com>
Date: Wed, 24 Jul 2019 00:10:58 -0700
From: Joe Perches <joe@...ches.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>, Linus Torvalds
	 <torvalds@...ux-foundation.org>, linux-kernel@...r.kernel.org
Cc: Jonathan Corbet <corbet@....net>, Stephen Kitt <steve@....org>, Kees
 Cook <keescook@...omium.org>, Nitin Gote <nitin.r.gote@...el.com>,
 jannh@...gle.com,  kernel-hardening@...ts.openwall.com, Andrew Morton
 <akpm@...ux-foundation.org>
Subject: Re: [PATCH V2 1/2] string: Add stracpy and stracpy_pad mechanisms

On Wed, 2019-07-24 at 08:53 +0200, Rasmus Villemoes wrote:
> BUILD_BUG_ON(!__same_type())
> strscpy(dst, src, ARRAY_SIZE(dst))

Doing this without the temporary is less legible to read
the compiler error when someone improperly does:

	char *foo;
	char *bar;

	stracpy(foo, bar);


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.