{"action":"opened","issue":{"url":"https://api.github.com/repos/Itseez/opencv/issues/4886","labels_url":"https://api.github.com/repos/Itseez/opencv/issues/4886/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/4886/comments","events_url":"https://api.github.com/repos/Itseez/opencv/issues/4886/events","html_url":"https://github.com/Itseez/opencv/issues/4886","id":97437501,"number":4886,"title":"Crash in flann (kdtree_index.h method searchLevelExact)","user":{"login":"opencv-pushbot","id":2051563,"avatar_url":"https://avatars.githubusercontent.com/u/2051563?v=3","gravatar_id":"","url":"https://api.github.com/users/opencv-pushbot","html_url":"https://github.com/opencv-pushbot","followers_url":"https://api.github.com/users/opencv-pushbot/followers","following_url":"https://api.github.com/users/opencv-pushbot/following{/other_user}","gists_url":"https://api.github.com/users/opencv-pushbot/gists{/gist_id}","starred_url":"https://api.github.com/users/opencv-pushbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencv-pushbot/subscriptions","organizations_url":"https://api.github.com/users/opencv-pushbot/orgs","repos_url":"https://api.github.com/users/opencv-pushbot/repos","events_url":"https://api.github.com/users/opencv-pushbot/events{/privacy}","received_events_url":"https://api.github.com/users/opencv-pushbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Itseez/opencv/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/category:%20flann","name":"category: flann","color":"ededed"},{"url":"https://api.github.com/repos/Itseez/opencv/labels/priority:%20high","name":"priority: high","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-27T10:58:12Z","updated_at":"2015-07-27T10:58:13Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/4073\r\n```\n|| Sebastian Bartmann on 2014-12-18 09:15\n|| Priority: High\n|| Affected: branch 'master' (3.0-dev)\n|| Category: flann\n|| Tracker: Bug\n|| Difficulty: \n|| PR: \n|| Platform: x64 / Windows\n```\n\nCrash in flann (kdtree_index.h method searchLevelExact)\n-----------\n```\nUnder 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. \r\n\r\nThe 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. \r\n\r\nI'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.\n```\n\nHistory\n-------"}}