-
Notifications
You must be signed in to change notification settings - Fork 8.3k
drivers: sensor: fcx_mldx5: Fix potential buffer overflow in UART frame #92992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: sensor: fcx_mldx5: Fix potential buffer overflow in UART frame #92992
Conversation
jeppenodgaard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix Coverity issue CID 363738 (CWE-120): A potential buffer overflow could occur in fcx_mldx5_uart_send() due to unchecked memcpy() when copying command data into a fixed-size frame buffer. This patch ensures that the length of the data being copied validated against the remaining buffer size to prevent overruns. Also replaces a redundant strlen() call with the precomputed cmd_data_len. Fixes: zephyrproject-rtos#92634 Signed-off-by: sudarsan N <[email protected]>
a91b6fe to
b522d57
Compare
|
It is my understanding that it's a common practice in some regions in India that the full name is only single letter(s) so I don't really see an issue here. Don't forget that Zephyr is a global community :) |
Thank you for pointing @kartben @JarmouniA . |
Okey my mistake then, sorry for the noise. |



Fix Coverity issue CID 363738 (CWE-120): A potential buffer overflow could occur in fcx_mldx5_uart_send() due to unchecked memcpy() when copying command data into a fixed-size frame buffer.
This patch ensures that the length of the data being copied validated against the remaining buffer size to prevent overruns. Also replaces a redundant strlen() call with the precomputed cmd_data_len.
Fixes: #92634