mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
Merge "haven: hh_rm_iface: Avoid integer overflow for multiplication"
This commit is contained in:
commit
d4f2423d74
1 changed files with 2 additions and 0 deletions
|
|
@ -121,6 +121,8 @@ hh_rm_vm_get_hyp_res(hh_vmid_t vmid, u32 *n_entries)
|
|||
|
||||
/* The response payload should contain all the resource entries */
|
||||
if (resp_payload_size < sizeof(*n_entries) ||
|
||||
(sizeof(*resp_entries) &&
|
||||
(resp_payload->n_resource_entries > U32_MAX / sizeof(*resp_entries))) ||
|
||||
(sizeof(*n_entries) > (U32_MAX -
|
||||
(resp_payload->n_resource_entries * sizeof(*resp_entries)))) ||
|
||||
resp_payload_size != sizeof(*n_entries) +
|
||||
|
|
|
|||
Loading…
Reference in a new issue