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

Ziti_resolve faults if host is NULL #525

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jun 24, 2023

  1. Handle case of host == NULL

    The fix addresses two defects. The getaddrinfo interface contract
    allowed for host == NULL, but Ziti_resolve assumed host != NULL. zitify
    nc -l 9999 would trigger a fault.  Additionally, hints was accessed
    without checking to ensure it was NULL. Lastly, Ziti_resolve would leak
    res and addr if the function wasn't successful.
    
    Signed-off-by: Tom Carroll <4632752+tomc797@users.noreply.github.com>
    tomc797 committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    014e9d3 View commit details
    Browse the repository at this point in the history
  2. Check for the existence of struct sockaddr_in::sin_len.

    4.3BSD-Reno added length member. Check for the member and define
      variable if it exists.
    
    Signed-off-by: Tom Carroll <4632752+tomc797@users.noreply.github.com>
    tomc797 committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    45d71d4 View commit details
    Browse the repository at this point in the history
  3. Set member sockaddr_in::sin_len if it exists.

    Signed-off-by: Tom Carroll <4632752+tomc797@users.noreply.github.com>
    tomc797 committed Jun 24, 2023
    Configuration menu
    Copy the full SHA
    8f876f9 View commit details
    Browse the repository at this point in the history