Skip to content

Commit

Permalink
mmc: core: Fix use of uninitialized data in mmc_cmd_app.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrei Warkentin authored and Chris Ball committed May 25, 2011
1 parent 6a7a6b4 commit 87f6119
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mmc/core/sd_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 87f6119

Please sign in to comment.