Skip to content

Crash in flann (kdtree_index.h method searchLevelExact) #4886

@opencv-pushbot

Description

@opencv-pushbot

Transferred from http://code.opencv.org/issues/4073

|| Sebastian Bartmann on 2014-12-18 09:15
|| Priority: High
|| Affected: branch 'master' (3.0-dev)
|| Category: flann
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x64 / Windows

Crash in flann (kdtree_index.h method searchLevelExact)

Under certain circumstances the third parameter(const NodePtr node) passed in the searchLevelExact method in file kdtree_index.h seems to be NULL, leading  to a crash. 

The method traverses the tree recursively. Unfortunately it isn't checked that a child is really existing before trying to visit it. The method only stops traversing if both childs aren't present. 

I'm not sure if a null pointer check is missing here or if it is a tree construction problem. Maybe a node should always have two children or none. In this case the method would be right.

History

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions