★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/27070Nouvelle recherche | Portail wanayoo
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

src: don't point to out of scope variable #27070

Closed
wants to merge 1 commit into from
Closed

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Apr 3, 2019

Coverity reported this. The addr pointer is passed to req_wrap->Dispatch(). By the time this happens, the value that addr points to, addr_storage, is out of scope. This commit remedies that.

cc: @santigimeno

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Coverity reported this. The addr pointer is passed to
req_wrap->Dispatch(). By the time this happens, the value
that addr points to, addr_storage, is out of scope. This
commit remedies that.
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 3, 2019

Copy link
Member

@santigimeno santigimeno left a comment

Good catch. Thanks!

devsnek
devsnek approved these changes Apr 3, 2019
lpinca
lpinca approved these changes Apr 3, 2019
ZYSzys
ZYSzys approved these changes Apr 4, 2019
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 4, 2019

@ZYSzys
Copy link
Member

@ZYSzys ZYSzys commented Apr 7, 2019

Landed in 97c0a34 🎉

@ZYSzys ZYSzys closed this Apr 7, 2019
ZYSzys added a commit that referenced this issue Apr 7, 2019
Coverity reported this. The addr pointer is passed to
req_wrap->Dispatch(). By the time this happens, the value
that addr points to, addr_storage, is out of scope. This
commit remedies that.

PR-URL: #27070
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
@cjihrig cjihrig deleted the coverity branch Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

9 participants