Skip to content

Fix hostname buffer size at HOST_NAME_MAX - #3577

Open
bugstan wants to merge 1 commit into
BurntSushi:masterfrom
bugstan:master
Open

bugstan wants to merge 1 commit into
BurntSushi:masterfrom
bugstan:master

Conversation

@bugstan

@bugstan bugstan commented Oct 25, 2026

Copy link
Copy Markdown

HOST_NAME_MAX excludes the terminating NUL. Allocate one extra byte so maximum-length hostnames can be read correctly and included in hyperlinks.

Verified with 63- and 64-byte hostnames in isolated UTS namespaces. grep-cli tests and all 332 integration tests pass.

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.

1 participant