-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
potential null pointer deref? #19991
Comments
Yeah, the value passed to |
We could add a check that |
Either way! I wasn't going to create this issue, but the defensive check on line 20 that checks for nullptr made it seem like something worth double checking. Thanks for your responses! |
The input to this function shouldn't be null, and callers are not equipped to deal with a nullptr return value. Change the nullptr return to a CHECK_NOT_NULL(). Also fix the indentation of the function. PR-URL: nodejs#21545 Fixes: nodejs#19991 Reviewed-By: Wyatt Preul <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
The input to this function shouldn't be null, and callers are not equipped to deal with a nullptr return value. Change the nullptr return to a CHECK_NOT_NULL(). Also fix the indentation of the function. PR-URL: #21545 Fixes: #19991 Reviewed-By: Wyatt Preul <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
We noticed these two sites as potential null pointer deferences.
node/src/node_trace_events.cc
Lines 51 to 53 in ebbf393
node/src/node_trace_events.cc
Lines 130 to 132 in ebbf393
It seems like
category_group_enabled
can be null based on the defensive check:node/src/node_trace_events.cc
Lines 19 to 23 in ebbf393
But I suspect because of the usage
GetCategoryGroupEnabled
is not called with null pointer. Any thoughts?The text was updated successfully, but these errors were encountered: