diff mbox

+ mmc-use-snprintf-not-sprintf.patch added to -mm tree

Message ID 201008272006.o7RK6YPN013308@imap1.linux-foundation.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Andrew Morton Aug. 27, 2010, 8:06 p.m. UTC
None
diff mbox

Patch

diff -puN drivers/mmc/card/block.c~mmc-use-snprintf-not-sprintf drivers/mmc/card/block.c
--- a/drivers/mmc/card/block.c~mmc-use-snprintf-not-sprintf
+++ a/drivers/mmc/card/block.c
@@ -620,7 +620,8 @@  static struct mmc_blk_data *mmc_blk_allo
 	 * 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);