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

range: T6744: fix a crash when validating malformed ranges #10

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

dmbaturin
Copy link
Member

Change Summary

Fix a crash that occurs when trying to validate good-looking but wrong addresses:

vyos@vyos# ipaddrcheck --is-ipv4-range 192.0.2.400-192.0.2.800 && echo y
Segmentation fault

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Other (please describe):

Proposed changes

The cause was that individual components weren't validated properly before trying to convert them to inaddr structures and manipulate them.

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@jestabro jestabro self-requested a review September 27, 2024 15:38
@c-po c-po merged commit 52c1270 into vyos:current Sep 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants