Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/ethos: Fix off-by-one bug #18823

Merged
merged 1 commit into from Oct 31, 2022
Merged

drivers/ethos: Fix off-by-one bug #18823

merged 1 commit into from Oct 31, 2022

Conversation

Diff-fusion
Copy link
Contributor

The ethernet over serial driver _recv function checks the buffer size after writing the data.
To fix this I moved the bounds check before the function writing to the buffer.

@github-actions github-actions bot added the Area: drivers Area: Device drivers label Oct 30, 2022
@miri64 miri64 requested a review from benpicco October 31, 2022 07:32
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 31, 2022
@maribu
Copy link
Member

maribu commented Oct 31, 2022

Thx! The fix looks good to me. But I am currently afk to test this. I will do so as soon as possible. But maybe @benpicco is quicker to give this a review.

@maribu maribu changed the title Fix off-by-one in ETHOS driver drivers/ethos: Fix off-by-one bug Oct 31, 2022
@maribu
Copy link
Member

maribu commented Oct 31, 2022

Oh, could you change the commit title to match the template <subsystem>: <brief description>? E.g. like I changed the PR title?

@riot-ci
Copy link

riot-ci commented Oct 31, 2022

Murdock results

✔️ PASSED

b1dff29 drivers/ethos: Fix off-by-one in ETHOS driver

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and still works.

Keep in mind that SLIP has the very same issue.
(see #18229, #18066)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants