From: Alan Cox <alan@linux.intel.com>
To: pierre@ossman.eu, linux-mmc@vger.kernel.org
Subject: [PATCH] mmc: use snprintf not sprintf
Date: Thu, 17 Jun 2010 15:58:46 +0100 [thread overview]
Message-ID: <20100617145807.15099.65843.stgit@localhost.localdomain> (raw)
Just starting on the MMC/SDIO patches in the Intel tree for upstream. This one
is very much a take it or leave it item. Merge or drop ?
From: JiebingLi <jiebing.li@intel.com>
This patch fixes an issue found by klockwork. Just paranoia.
Signed-off-by: JiebingLi <jiebing.li@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/mmc/card/block.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index cb9fbc8..9793f4c 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -535,7 +535,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
* messages to tell when the card is present.
*/
- sprintf(md->disk->disk_name, "mmcblk%d", devidx);
+ snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+ "mmcblk%d", devidx);
blk_queue_logical_block_size(md->queue.queue, 512);
next reply other threads:[~2010-06-17 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 14:58 Alan Cox [this message]
2010-08-27 19:59 ` [PATCH RESEND] mmc: use snprintf not sprintf Chris Ball
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=20100617145807.15099.65843.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=linux-mmc@vger.kernel.org \
--cc=pierre@ossman.eu \
/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.