Skip to content

Potential seg-fault in initialize_cameras_landmarks #1639

@OwenMcGee

Description

@OwenMcGee

In arrows/mvg/algo/initialize_cameras_landmarks.h, the initialize function gives a default value for the constraints parameter as nullptr. However, as far as I can tell actually calling the function with the default parameter will always result in a crash.

The constraints parameter will be passed into initialize_keyframes, which will then pass it into metadata_centric_keyframe_initialization, which will then reach reach line 2440, and crash.

I'm unsure if the solution for this is to simply remove the default value for the constraints parameter, or if additional checks and cases for a value of nullptr are needed throughout the code called by the function. I believe the default value for the parameter was ported over from the arrows/mvg/algo/initialize_cameras_landmarks_basic.h file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions