Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000697Taste[All Projects] PolyORB-HI-Cpublic2017-10-26 12:302024-03-20 13:20
Reportermiguel_munoz 
Assigned Tohugues 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusclosedResolutionwon't fix 
PlatformLinux, RTEMSOSOS Version
Summary0000697:

write result not checked in serial drivers

Description

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).

Additional Information

All the drivers should be checked in case that the same error appears elsewhere.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003061)
hugues (administrator)
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.


- Issue History
Date Modified Username Field Change
2017-10-26 12:30 miguel_munoz New Issue
2017-10-26 12:30 miguel_munoz Status

new => assigned

2017-10-26 12:30 miguel_munoz Assigned To

=> user2

2017-10-26 12:31 hugues Assigned To

user2 => hugues

2017-10-26 12:31 hugues Note Added: 0003061
2024-03-20 13:20 maxime Status

assigned => closed

2024-03-20 13:20 maxime Resolution

open => won't fix



Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker