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

url: fix -Warray-bounds warning #9751

Merged
merged 1 commit into from
Nov 29, 2016
Merged

Conversation

santigimeno
Copy link
Member

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Avoid out of bounds access to url_host_value.ipv6 array.

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 22, 2016
@santigimeno santigimeno added the url Issues and PRs related to the legacy built-in url module. label Nov 22, 2016
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

Ai, obvious bug is obvious. LGTM.

Aside: I fail to understand why it favors hard-coded values over arraysize(host->value.ipv6).

@santigimeno
Copy link
Member Author

Avoid out of bounds access to `url_host_value.ipv6` array.

PR-URL: nodejs#9751
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@santigimeno santigimeno merged commit 0ab2182 into nodejs:master Nov 29, 2016
@santigimeno
Copy link
Member Author

Thanks. Landed in 0ab2182

addaleax pushed a commit that referenced this pull request Dec 5, 2016
Avoid out of bounds access to `url_host_value.ipv6` array.

PR-URL: #9751
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Fishrock123 Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants