Message ID | 201008272006.o7RK6YPN013308@imap1.linux-foundation.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
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);