Skip to content

fix: Ensure nul-termination of string for inet_pton#1462

Merged
zkat merged 2 commits into
mainfrom
sy/is-valid-ip-string
May 8, 2026
Merged

fix: Ensure nul-termination of string for inet_pton#1462
zkat merged 2 commits into
mainfrom
sy/is-valid-ip-string

Conversation

@TartanLlama

Copy link
Copy Markdown
Contributor

inet_pton takes a NUL-terminated string. We pass the data from a std::string_view, which is not guaranteed to be NUL-terminated. I believe that current calls will all involve NUL-terminated strings, so it shouldn't cause a problem right now in practice, but may do in the future.

@zkat zkat merged commit 0e3afbe into main May 8, 2026
29 checks passed
@zkat zkat deleted the sy/is-valid-ip-string branch May 8, 2026 22:30
pull Bot pushed a commit to eduardomourar/js-compute-runtime that referenced this pull request May 14, 2026
Co-authored-by: Kat Marchán <kzm@zkat.tech>
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.

3 participants