mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 16:13:54 +08:00
mmc: Use snprintf, not sprintf.
Fix an issue found by klockwork. Just paranoia. Signed-off-by: JiebingLi <jiebing.li@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
53f3a9e26e
commit
12578f66b9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user