Skip to content

Fix posix stdin read error handling#463

Open
mdanilov wants to merge 1 commit into
eclipse-openbsw:mainfrom
mdanilov:bugfix/stdio
Open

Fix posix stdin read error handling#463
mdanilov wants to merge 1 commit into
eclipse-openbsw:mainfrom
mdanilov:bugfix/stdio

Conversation

@mdanilov
Copy link
Copy Markdown

getByteFromStdin never returns -1 because it checks the size of the span passed by value instead of the return value of the uart read.
Use ssize_t for the ::read() result in Uart::read to avoid silent conversion of -1 to a large size_t.

getByteFromStdin never returns -1 because it checks
the size of the span passed by value instead of the
return value of the uart read.
Use ssize_t for the ::read() result in Uart::read to
avoid silent conversion of -1 to a large size_t.
@mdanilov mdanilov marked this pull request as ready for review May 27, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant