-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
src: guard against overflow in ParseArrayIndex() (v4.x) #8409
Conversation
Some red in the CI |
It's that pseudo-tty/no_dropped_stdio test. I don't think that's caused by this PR. |
Here is a run of CI on the head of |
5b79c90
to
f98a94b
Compare
@bnoordhuis would yu be able to rebase? |
6a126fb
to
004d665
Compare
It's not used anywhere else so move it out of src/node_internals.h. PR-URL: nodejs#7497 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ParseArrayIndex() would wrap around large (>=2^32) index values on platforms where sizeof(int64_t) > sizeof(size_t). Ensure that the return value fits in a size_t. PR-URL: nodejs#7497 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Coverity marked a change in 630096b as a constant expression. However, on platforms where sizeof(int64_t) > sizeof(size_t), this should not be the case. This commit flags the comparison as OK to coverity. PR-URL: nodejs#7587 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
bba196b
to
785b91e
Compare
@thealphanerd Rebased, PTAL. CI: https://ci.nodejs.org/job/node-test-pull-request/4573/ |
CI is good... only failures are infra. landing |
landed in 29315da...f1a7a1a All CI failures were infra related |
Back-port of #7497 and #7587.
R=@thealphanerd
CI: https://ci.nodejs.org/job/node-test-pull-request/3941/