提交 12578f66 编写于 作者: J JiebingLi 提交者: Chris Ball

mmc: Use snprintf, not sprintf.

Fix an issue found by klockwork. Just paranoia.
Signed-off-by: NJiebingLi <jiebing.li@intel.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 53f3a9e2
......@@ -620,7 +620,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册