summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrei Warkentin <andreiw@motorola.com>2011-04-13 15:33:12 -0500
committerChris Ball <cjb@laptop.org>2011-05-24 21:01:38 -0400
commit87f6119e25bbe0fd60e76f599d5fa10cf489519c (patch)
tree10cc6964609facbddb8653b04475dfd33850ab01 /drivers
parent6a7a6b45f454686a1549729bfbae31f0b3b595d6 (diff)
mmc: core: Fix use of uninitialized data in mmc_cmd_app.
mmc_cmd_app did not zero out mmc_command on stack. Reported-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/sd_ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 76af349c14b..71fdb07fd8d 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -29,6 +29,8 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
BUG_ON(!host);
BUG_ON(card && (card->host != host));
+ memset(&cmd, 0, sizeof(struct mmc_command));
+
cmd.opcode = MMC_APP_CMD;
if (card) {