Skip to content

FIX: Remove nullptr dereference from aliceVision_multiview#2115

Open
philippremy wants to merge 1 commit intoalicevision:developfrom
philippremy:bits/nullptr-deref
Open

FIX: Remove nullptr dereference from aliceVision_multiview#2115
philippremy wants to merge 1 commit intoalicevision:developfrom
philippremy:bits/nullptr-deref

Conversation

@philippremy
Copy link
Copy Markdown
Contributor

There is a guaranteed nullptr dereference in aliceVision_multiview, because TriangulationSphericalKernel::fitLS() is at least called once with the default nullptr argument (from iterativeReweightedLeastSquares() and localOptimization()), which is unconditionally dereferenced.

While not always causing an invalid access, it is UB and was identified as such by LLVM UBSanitizer. If we pass down the pointer to the very end, it is properly null-checked.

There is a guaranteed nullptr dereference in aliceVision_multiview,
because TriangulationSphericalKernel::fitLS is at least called once with
the default nullptr argument (from iterativeReweightedLeastSquares() and
localOptimization()), which is unconditionally dereferenced.

While not always causing an invalid access, it is UB and was identified
as such by LLVM UBSanitizer. If we pass down the pointer to the very
end, it is properly null-checked.

Signed-off-by: Philipp Remy <philipp@philippremy.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant