RTEMS | GRCANFD: Fix Coverity issues (!390)
Matteo Concas (@matteo.concas)
gitlab at rtems.org
Wed Feb 5 09:43:06 UTC 2025
Matteo Concas created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/390
Project:Branches: matteo.concas/rtems-gaisler:matteo/coverity-grcanfd to rtems/rtos/rtems:main
Author: Matteo Concas
Three issues in the GRCANFD driver were recently found by Coverity scans. This merge request aims to resolve all three.
Commit `fc7a1ec1` will fix Coverity issues 1642611 and 1473629.
The dead code was the result of a negative value check on an unsigned integer, a signed integer is now used.
Commit `1bab28fd` will fix Coverity issue 1642592.
The possible overflow was also due to the unsigned integer `dlc` possibly being assigned `-1` as a value. I have still added a mask as a sanity check, the DLC (Data Length) field of a GRCANFD frame is 4 bits wide for reference.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/390
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250205/8b274182/attachment.htm>
More information about the bugs
mailing list