-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
pybind11_getbuffer: Fix Potential Nullptr Dereference #1657
Conversation
@ax3l Only your team can actually see your dashboard, are we 100% sure this isn't a false positive? I know vim's codebase has some false positives. |
In what circumstance would |
Later in the code there is a check to tell whether |
Since even |
@bstaletic sure, if you like I can give you access (gitter me, I think via mail). I just did not filter my "thirdParty" dir, that's why they show up and they look useful, regarding public struct members. |
@ax3l is right. Currently, on line 466 |
Fix a potential nullptr dereference of `obj`. Found with coverity in a downstream project.
d538bec
to
0154597
Compare
Alternative implementation for pybind#1657: if we know that `obj` is never a `nullptr` [1], we should not `nullptr`-check it *after* already dereferencing it. [1] pybind#1657 (comment)
Alternative implementation following @wjakob's comment about
Coverity only complains that we do a |
Alternative implementation for #1657: if we know that `obj` is never a `nullptr` [1], we should not `nullptr`-check it *after* already dereferencing it. [1] #1657 (comment)
Closing this as #1664 was merged. |
Fix a potential nullptr dereference of
obj
.Found with coverity in a downstream project.