RTEMS | bsp/arm/tms570: protect against baud rate divide-by-zero (!1216)
Avi Weiss (@thnkslprpt)
gitlab at rtems.org
Wed Apr 22 10:14:32 UTC 2026
Avi Weiss created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1216
Project:Branches: thnkslprpt/rtems:fix-5555-protect-against-baud-zero to rtems/rtos/rtems:main
Author: Avi Weiss
## Summary
Fixes #5555
`tms570_sci_set_attributes` has no protection against 0 baud rate
`rtems_termios_baud_to_number` documentation shows it can return 0
Can result in divide by zero inside `tms570_sci_set_attributes` in at least one or two locations (and then also `tms570_sci_interrupt_last_close`).
This change safely returns false if we end up somehow with a 0 `baudrate` value.
Separate (2nd) commit addresses some typos + applies RTEMS clang_format preferences.
## Generative AI
None
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1216
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/20260422/fce808c8/attachment-0001.htm>
More information about the bugs
mailing list