Merge "soc: qcom: spcom: validate rx_buf in spcom_rx before usage"

This commit is contained in:
Linux Build Service Account 2017-04-18 13:57:02 -07:00 committed by Gerrit - the friendly Code Review server
commit be57574adf

View file

@ -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);