mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge "bus: mhi: Fix potential out-of-bound access" into kernel.lnx.5.4.r1-rel
This commit is contained in:
commit
0cb96a3ce3
1 changed files with 2 additions and 1 deletions
|
|
@ -357,7 +357,8 @@ static struct mhi_sat_device *find_sat_dev_by_id(
|
|||
static bool mhi_sat_isvalid_header(struct sat_header *hdr, int len)
|
||||
{
|
||||
/* validate payload size */
|
||||
if (len >= sizeof(*hdr) && (len != hdr->payload_size + sizeof(*hdr)))
|
||||
if ((len < sizeof(*hdr)) ||
|
||||
(len >= sizeof(*hdr) && (len != hdr->payload_size + sizeof(*hdr))))
|
||||
return false;
|
||||
|
||||
/* validate SAT IPC version */
|
||||
|
|
|
|||
Loading…
Reference in a new issue