Repository navigation
Conversation
woahwhattheheck
added a commit
to woahwhattheheck/spiped
that referenced
this pull request
Sep 13, 2026
Adapt the semantic fix from Tarsnap#450 onto current fork master while preserving the fork's existing NaN and -r/-R fixes. Reject non-finite intervals and values above 1e9 seconds; add focused CLI regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This Pull Request resolves #449: [bug bounty] Huge -r interval causes continuous DNS re-resolution and high CPU.
Summary of Changes
The bug was caused by accepting non-finite or extremely large values for the
-roption, which when converted totime_tresulted in an already-expired timer, causing a busy loop of DNS re-resolution. The fix adds a check to reject non-finite values and values exceeding a safe maximum (1e9 seconds, roughly 31 years) for the-roption, preventing the timer from being set to an invalid state.Modified Files
spiped/main.cVerification
Tests not executed (no standard script detected)
Closes #449