public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: use snprintf not sprintf
@ 2010-06-17 14:58 Alan Cox
  2010-08-27 19:59 ` [PATCH RESEND] " Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2010-06-17 14:58 UTC (permalink / raw)
  To: pierre, linux-mmc

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);
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH RESEND] mmc: use snprintf not sprintf
  2010-06-17 14:58 [PATCH] mmc: use snprintf not sprintf Alan Cox
@ 2010-08-27 19:59 ` Chris Ball
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2010-08-27 19:59 UTC (permalink / raw)
  To: Alan Cox; +Cc: pierre, linux-mmc, akpm

Hi Alan,

This wasn't merged, because it went to Pierre rather than Andrew.
Andrew, could you take it?

From: JiebingLi <jiebing.li@intel.com>
Date: Thu, 17 Jun 2010 15:58:46 +0100

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);
 

--
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-27 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 14:58 [PATCH] mmc: use snprintf not sprintf Alan Cox
2010-08-27 19:59 ` [PATCH RESEND] " Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox