All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] miiphy: use strcpy() not sprintf()
Date: Thu, 14 Jul 2011 15:49:23 +0200	[thread overview]
Message-ID: <4E1EF3E3.8090600@aribaud.net> (raw)
In-Reply-To: <1310646667-2426-1-git-send-email-lwithers@guralp.com>

Hi Laurence,

Le 14/07/2011 14:31, Laurence Withers a ?crit :
> In miiphy_register() the new device's name was initialised by passing a
> string parameter as the format string to sprintf(). As this would cause
> problems if it ever contained a '%' symbol, switch to using strcpy()
> instead.

Please use strncpy() which will also guard against overflows.

Amicalement,
-- 
Albert.

  reply	other threads:[~2011-07-14 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 12:31 [U-Boot] [PATCH] miiphy: use strcpy() not sprintf() Laurence Withers
2011-07-14 13:49 ` Albert ARIBAUD [this message]
2011-07-14 18:02   ` Mike Frysinger
2011-07-15  9:21     ` Laurence Withers

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=4E1EF3E3.8090600@aribaud.net \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.