LF-1594 dma: pxp: fix out-of-bounds access

Coverity issue ID: 379372

As only one overlayer supported, the initialization for ol_param
need to be adjusted accordingly.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 13dcde085e1d017440e3f0bc829faac340a8674e)
This commit is contained in:
Robby Cai 2020-07-01 17:00:31 +08:00
parent 6ba0e80767
commit 2d98ad7b3a
1 changed files with 1 additions and 1 deletions

View File

@ -1152,7 +1152,7 @@ static void __pxpdma_dostart(struct pxp_channel *pxp_chan)
memset(&pxp->pxp_conf_state.s0_param, 0, sizeof(struct pxp_layer_param));
memset(&pxp->pxp_conf_state.out_param, 0, sizeof(struct pxp_layer_param));
memset(pxp->pxp_conf_state.ol_param, 0, sizeof(struct pxp_layer_param) * 8);
memset(pxp->pxp_conf_state.ol_param, 0, sizeof(struct pxp_layer_param));
memset(&pxp->pxp_conf_state.proc_data, 0, sizeof(struct pxp_proc_data));
/* S0 */
desc = list_first_entry(&head, struct pxp_tx_desc, list);