diff options
author | JiebingLi <jiebing.li@intel.com> | 2010-06-17 10:58:46 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2010-10-23 09:11:11 -0400 |
commit | 12578f66b9058e63f193fbfe1552e1d1bfa361bb (patch) | |
tree | 887d13de57646ae6debc250f03b858d9e67bd30c /drivers/mmc/card | |
parent | 53f3a9e26ed5a94bd3caf732e7635692cd3c4402 (diff) |
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>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 00073b7c0368..759a105cb216 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -620,7 +620,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
620 | * messages to tell when the card is present. | 620 | * messages to tell when the card is present. |
621 | */ | 621 | */ |
622 | 622 | ||
623 | sprintf(md->disk->disk_name, "mmcblk%d", devidx); | 623 | snprintf(md->disk->disk_name, sizeof(md->disk->disk_name), |
624 | "mmcblk%d", devidx); | ||
624 | 625 | ||
625 | blk_queue_logical_block_size(md->queue.queue, 512); | 626 | blk_queue_logical_block_size(md->queue.queue, 512); |
626 | 627 | ||