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

Incorrect format string in default_resolve_host #496

Closed
fakkeroni opened this issue Jun 8, 2022 · 1 comment
Closed

Incorrect format string in default_resolve_host #496

fakkeroni opened this issue Jun 8, 2022 · 1 comment

Comments

@fakkeroni
Copy link

aws trying to log
host_name->bytes
in
AWS_LOGF_DEBUG(AWS_LS_IO_DNS, "id=%p: Host resolution requested for %s", (void *)resolver, host_name->bytes);
the matching format string parameter is "%s", however host_name->bytes is of type:
const uint8_t bytes[1];
which is generally not null terminated.

@bretambrose
Copy link
Contributor

A byte array in general, sure, but the bytes off the end of aws_string are always null terminated.

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

No branches or pull requests

2 participants