driver: espi: npcx: fix out-of-bounds read in espi_vw_generic_isr.
Fix out-of-bounds read in espi_vw_generic_isr func. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This commit is contained in:
parent
b82a662866
commit
97db5d74c7
1 changed files with 3 additions and 1 deletions
|
@ -433,9 +433,11 @@ static void espi_vw_generic_isr(const struct device *dev, struct npcx_wui *wui)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx == ARRAY_SIZE(vw_in_tbl))
|
if (idx == ARRAY_SIZE(vw_in_tbl)) {
|
||||||
LOG_ERR("Unknown VW event! %d %d %d", wui->table,
|
LOG_ERR("Unknown VW event! %d %d %d", wui->table,
|
||||||
wui->group, wui->bit);
|
wui->group, wui->bit);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
signal = vw_in_tbl[idx].sig;
|
signal = vw_in_tbl[idx].sig;
|
||||||
if (signal == ESPI_VWIRE_SIGNAL_SLP_S3
|
if (signal == ESPI_VWIRE_SIGNAL_SLP_S3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue