mmc: cmdq_hci: Fix memcpy buffer overflow in cmdq task history

This patch fixes the buffer overflow in memcpy while logging cmdq
task history. Cmdq task history used only for debugging purpose.

Change-Id: Ia2f70e0f4316f7f55e4b96aac5da54e8dcd7e435
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
This commit is contained in:
Ram Prakash Gupta 2018-03-28 12:43:36 +05:30
commit 8740639105

View file

@ -684,7 +684,7 @@ static void cmdq_log_task_desc_history(struct cmdq_host *cq_host, u64 task,
cq_host->thist[cq_host->thist_idx].is_dcmd = is_dcmd;
memcpy(&cq_host->thist[cq_host->thist_idx++].task,
&task, cq_host->task_desc_len);
&task, sizeof(task));
}
static void cmdq_prep_dcmd_desc(struct mmc_host *mmc,