TASTE bugtrack - Taste
View Issue Details
0000697Taste[All Projects] PolyORB-HI-Cpublic2017-10-26 12:302024-03-20 13:20
miguel_munoz 
hugues 
normalmajorhave not tried
closedwon't fix 
Linux, RTEMS
0000697: write result not checked in serial drivers
The drivers po_hi_driver_linux_serial.c and po_hi_driver_leon_serial.c do not perform any check that the number of bytes written to the serial line is the number requested. E.g.: n = write (po_hi_c_driver_leon_serial_fd_write, &(__po_hi_c_driver_serial_leon_sender_msg.content), __PO_HI_MESSAGES_MAX_SIZE); But it is never checked if __PO_HI_MESSAGES_MAX_SIZE == n. In case that the size of the message __PO_HI_MESSAGES_MAX_SIZE is larger than the maximum possible for the serial line, the message is not transmitted correctly and no error is reported. Furthermore, the synchronization with the reader is lost permanently (the reader always reads __PO_HI_MESSAGES_MAX_SIZE bytes, introducing an offset).
All the drivers should be checked in case that the same error appears elsewhere.
No tags attached.
Issue History
2017-10-26 12:30miguel_munozNew Issue
2017-10-26 12:30miguel_munozStatusnew => assigned
2017-10-26 12:30miguel_munozAssigned To => user2
2017-10-26 12:31huguesAssigned Touser2 => hugues
2017-10-26 12:31huguesNote Added: 0003061
2024-03-20 13:20maximeStatusassigned => closed
2024-03-20 13:20maximeResolutionopen => won't fix

Notes
(0003061)
hugues   
2017-10-26 12:31   
Hi Miguel, Assigning to myself, we solved similar issues in the core, we take not we have to perform the same for the drivers.