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: Prevent panic caused by subtracting with overflow #36

Merged

Conversation

hubertpawlak
Copy link
Contributor

@hubertpawlak hubertpawlak commented Jul 18, 2023

This pull request fixes a bug that caused panic when trying to subtract the last character from an empty string. This could happen if there was a lost connection and the returned string was empty. I experienced this when running rups for a longer period of time on Wi-Fi.

I verified the fix by simulating packet loss with nftables on Linux.

This bug occurred if the string was empty (e.g. from a lost connection)
@aramperes
Copy link
Owner

Sorry for the delay, I missed this email

@aramperes aramperes merged commit 8712a60 into aramperes:master Aug 14, 2023
7 checks passed
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.

2 participants