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

fixes to struct servent and test for LookupService #207

Merged
merged 2 commits into from
Jul 5, 2021

Conversation

ahgamut
Copy link
Collaborator

@ahgamut ahgamut commented Jul 5, 2021

This PR adds necessary changes from the comments in #204, and adds tests for the LookupService pair of functions.
The tests run without any error.

ahgamut added 2 commits July 5, 2021 23:10
* use calloc instead malloc for s_aliases
* use strcasecmp instead of strcmp
* look through aliases when comparing for LookupServicesByName
* provide buffer for name in LookupServicesByName also
* provide a filepath param in LookupServicesBy* for testing
* use static buffers and DNS_NAME_MAX for s_name
@ahgamut
Copy link
Collaborator Author

ahgamut commented Jul 5, 2021

@jart Unrelated to this PR: the redbean_test.com fails on my system (Debian 10 Linux).
This was happening even before #204. Is it related to any of my recent PRs?

Attached screenshot:
2021-07-06_00-36-58_1366x768

@jart
Copy link
Owner

jart commented Jul 5, 2021

Definitely file an issue for that. -0x006c is MBEDTLS_ERR_ASN1_BUF_TOO_SMALL which would seem to indicate that it's trying to write a der elliptic curve certificate that's greater than 2**16 in length. I need to know how to reproduce that. For example, does it happen if you git clone and run make?

Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/libc/dns/servicestxt_test.c Show resolved Hide resolved
@jart jart merged commit c0bec24 into jart:master Jul 5, 2021
@ahgamut ahgamut deleted the servent-fix branch July 5, 2021 20:15
@ahgamut ahgamut mentioned this pull request Jul 12, 2021
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