Skip to content

Commit

Permalink
Merge pull request #1022 from jgarstka/iss_3d_bugfix
Browse files Browse the repository at this point in the history
Fix: invalid array allocation in iss_3d.hpp
  • Loading branch information
jspricke committed Nov 27, 2014
2 parents 94d6611 + 112d4bc commit d396539
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions keypoints/include/pcl/keypoints/impl/iss_3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,16 @@ pcl::ISSKeypoint3D<PointInT, PointOutT, NormalT>::detectKeypoints (PointCloudOut
}
}

#ifdef _OPENMP
Eigen::Vector3d *omp_mem = new Eigen::Vector3d[threads_];

for (size_t i = 0; i < threads_; i++)
omp_mem[i].setZero (3);
#else
Eigen::Vector3d *omp_mem = new Eigen::Vector3d[1];

omp_mem[0].setZero (3);
#endif

double *prg_local_mem = new double[input_->size () * 3];
double **prg_mem = new double * [input_->size ()];
Expand Down

0 comments on commit d396539

Please sign in to comment.