trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.87k stars 76 forks source link

Fix #824 syslog writer panic #825

Closed marlonbaeten closed 7 months ago

marlonbaeten commented 7 months ago

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

codecov[bot] commented 7 months ago

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 :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #825 +/- ## ======================================= Coverage 58.60% 58.61% ======================================= Files 75 75 Lines 10732 10739 +7 ======================================= + Hits 6290 6295 +5 - Misses 4442 4444 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.