src: don't point to out of scope variable by cjihrig · Pull Request #27070 · nodejs/node (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
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), orvcbuild 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 added c++
Issues and PRs that require attention from people who are familiar with C++.
Issues and PRs related to the dgram subsystem / UDP.
labels
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thanks!
ZYSzys added the author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
ZYSzys pushed a commit that referenced this pull request
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
This was referenced
Apr 23, 2019
Reviewers
addaleax addaleax approved these changes
santigimeno santigimeno approved these changes
lpinca lpinca approved these changes
JungMinu JungMinu approved these changes
richardlau richardlau approved these changes
devsnek devsnek approved these changes
ZYSzys ZYSzys approved these changes
Labels
PRs that have at least one approval, no pending requests for changes, and a CI started.
Issues and PRs that require attention from people who are familiar with C++.
Issues and PRs related to the dgram subsystem / UDP.