public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Kees Cook <keescook@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH] doc: avoid strncpy in accounting tool
Date: Thu, 06 Jun 2013 18:52:17 +0200	[thread overview]
Message-ID: <87fvwvqj0e.fsf@igel.home> (raw)
In-Reply-To: <20130606024930.GA24279@www.outflux.net> (Kees Cook's message of "Wed, 5 Jun 2013 19:49:30 -0700")

Kees Cook <keescook@chromium.org> writes:

> Avoid strncpy anti-pattern. Use strdup() instead, as already done for
> the logfile optarg.

There should be no need to copy the string, option arguments are stable.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2013-06-06 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06  2:49 [PATCH] doc: avoid strncpy in accounting tool Kees Cook
2013-06-06 16:52 ` Andreas Schwab [this message]
2013-06-08 18:50 ` Rob Landley
2013-06-10 21:21 ` Andrew Morton

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=87fvwvqj0e.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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