diff options
author | Andrei Warkentin <andreiw@motorola.com> | 2011-04-13 15:33:12 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-05-24 21:01:38 -0400 |
commit | 87f6119e25bbe0fd60e76f599d5fa10cf489519c (patch) | |
tree | 10cc6964609facbddb8653b04475dfd33850ab01 /drivers | |
parent | 6a7a6b45f454686a1549729bfbae31f0b3b595d6 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 76af349c14b4..71fdb07fd8de 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) { |