Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

HEXONET: Add error handling for MX and SRV record priority parsing #3355

Conversation

AsifNawaz-cnic
Copy link
Contributor

This PR addresses an issue where integer values parsed using strconv.ParseUint were not being checked to ensure they fit within the bounds of the target type (uint16). This could lead to incorrect conversions and potential runtime errors.

Changes:

  • Added an upper bound check after parsing the priority value with strconv.ParseUint.
  • Ensured that the parsed value does not exceed the maximum value of uint16 before performing the conversion.
  • Handled errors appropriately if the value exceeds the maximum allowable value for uint16.

@cafferata
Copy link
Collaborator

Ping @KaiSchwarz-cnic, the maintainer of the HEXONET provider.

@KaiSchwarz-cnic
Copy link
Contributor

KaiSchwarz-cnic commented Jan 13, 2025

@cafferata @AsifNawaz-cnic is part of my team. this PR is fine 👍

The PR patches two vulnerabilities reported by CodeQL for our fork:
image

@tlimoncelli
Copy link
Contributor

Great! Thanks!

@tlimoncelli tlimoncelli merged commit b5b2873 into StackExchange:main Jan 13, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants