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

Fix #824 syslog writer panic #825

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Fix #824 syslog writer panic #825

merged 2 commits into from
Jan 30, 2024

Conversation

marlonbaeten
Copy link
Collaborator

See #824

The Write trait implementation of SysLogWriter did not correctly handle writing multiple messages. The buffer was incorrectly considered empty on each call. Fixed by subtracting the current buffer cursor of the message limit (line 53).

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (208a25b) 58.60% compared to head (adffb1e) 58.61%.

Files Patch % Lines
src/log/syslog.rs 92.85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #825   +/-   ##
=======================================
  Coverage   58.60%   58.61%           
=======================================
  Files          75       75           
  Lines       10732    10739    +7     
=======================================
+ Hits         6290     6295    +5     
- Misses       4442     4444    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@japaric japaric left a comment

Choose a reason for hiding this comment

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

thanks!

@japaric japaric added this pull request to the merge queue Jan 30, 2024
Merged via the queue into main with commit 90e516b Jan 30, 2024
15 checks passed
@japaric japaric deleted the 824-syslog-writer-panic branch January 30, 2024 16:28
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.

sudo-rs panics during PostmarketOS development when called from pmbootstrap to test linux-lts build
2 participants