Skip to content

Commit

Permalink
Fix out-of-bound vector access in
Browse files Browse the repository at this point in the history
`HierarchicalClusteringIndex::copyTree`
  • Loading branch information
legrosbuffle committed Jun 29, 2020
1 parent 802bddb commit f9b25ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/flann/algorithms/hierarchical_clustering_index.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class HierarchicalClusteringIndex : public NNIndex<Distance>
{
dst = new(pool_) Node();
dst->pivot_index = src->pivot_index;
dst->pivot = points_[dst->pivot_index];
dst->pivot = dst->pivot_index == SIZE_MAX ? NULL : points_[dst->pivot_index];

if (src->childs.size()==0) {
dst->points = src->points;
Expand Down

0 comments on commit f9b25ab

Please sign in to comment.