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

Fix: sizeof(sizeof(addr.saX)) -> sizeof(addr.saX) in readaddrinfo #331

merged 1 commit into from May 12, 2020


Copy link

Currently it always returns 8 bytes (x64 architecture), so bind memcpy(dest, ai->ai_addr, ai->ai_addrlen) is buggy, and instead of relying on ai_addrlen field, ai_addr should be examined for type before copying; the last approach is a workaround, of course.

Copy link

Coverage Status

Coverage remained the same at 89.14% when pulling ebc1370 on basiliscos:fix-double-sizeof into 1cc7e83 on c-ares:master.

@bradh352 bradh352 merged commit 4c02944 into c-ares:master May 12, 2020
3 checks passed
@basiliscos basiliscos deleted the fix-double-sizeof branch May 12, 2020 11:38
eriklax pushed a commit to halon/c-ares that referenced this pull request Aug 22, 2020

Looks like a sed-gone-wrong, a sizeof inside of a sizeof.

Fix By: Ivan Baidakou (@basiliscos)
sergepetrenko pushed a commit to tarantool/c-ares that referenced this pull request Jul 29, 2022

Looks like a sed-gone-wrong, a sizeof inside of a sizeof.

Fix By: Ivan Baidakou (@basiliscos)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants