Commit 6654d185 authored by Flavio Ceolin's avatar Flavio Ceolin Committed by Maureen Helm
Browse files

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: default avatarFlavio Ceolin <flavio.ceolin@intel.com>
parent a12a6ab5
Loading
Loading
Loading
Loading
+1 −1
Changes for drivers/ipm/ipm_mcux.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
	}