Merge "soc: qcom: spcom: validate rx_buf in spcom_rx before usage"
This commit is contained in:
commit
be57574adf
1 changed files with 1 additions and 1 deletions
|
@ -898,12 +898,12 @@ static int spcom_rx(struct spcom_channel *ch,
|
|||
goto exit_err;
|
||||
}
|
||||
|
||||
copy_buf:
|
||||
if (!ch->glink_rx_buf) {
|
||||
pr_err("invalid glink_rx_buf.\n");
|
||||
goto exit_err;
|
||||
}
|
||||
|
||||
copy_buf:
|
||||
/* Copy from glink buffer to spcom buffer */
|
||||
size = min_t(int, ch->actual_rx_size, size);
|
||||
memcpy(buf, ch->glink_rx_buf, size);
|
||||
|
|
Loading…
Add table
Reference in a new issue