Commit 12578f66 authored by JiebingLi's avatar JiebingLi Committed by Chris Ball

mmc: Use snprintf, not sprintf.

Fix an issue found by klockwork. Just paranoia.
Signed-off-by: default avatarJiebingLi <jiebing.li@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 53f3a9e2
...@@ -620,7 +620,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) ...@@ -620,7 +620,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
* messages to tell when the card is present. * 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); blk_queue_logical_block_size(md->queue.queue, 512);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment