ipm: mcux: Fix possible buffer overflow
It is possible to happen a buffer overflow in ipm_send callback due a wrong comparison between signed/unsigned types. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
a12a6ab5b9
commit
6654d18596
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ static int mcux_mailbox_ipm_send(const struct device *d, int wait,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (size > MCUX_IPM_DATA_REGS * sizeof(uint32_t)) {
|
||||
if ((size < 0) || (size > MCUX_IPM_DATA_REGS * sizeof(uint32_t))) {
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue