Skip to content
Snippets Groups Projects
Commit ef19e992 authored by Federico Montesino Pouzols's avatar Federico Montesino Pouzols
Browse files

fix wrong comparison in a fix for error handling issues, re #13951

parent 8a89d3d1
No related branches found
No related tags found
No related merge requests found
...@@ -441,7 +441,7 @@ static ANNkd_ptr annReadTree(istream &in, // input stream ...@@ -441,7 +441,7 @@ static ANNkd_ptr annReadTree(istream &in, // input stream
in >> n_bnds; // number of bounding sides in >> n_bnds; // number of bounding sides
// allocate bounds array // allocate bounds array
if (0 < n_bnds || if (0 > n_bnds ||
static_cast<size_t>(std::numeric_limits<int>::max()) <= static_cast<size_t>(std::numeric_limits<int>::max()) <=
static_cast<size_t>(n_bnds / sizeof(ANNorthHalfSpace))) { static_cast<size_t>(n_bnds / sizeof(ANNorthHalfSpace))) {
annError("Too big number of bounding sides, would cause overflow when " annError("Too big number of bounding sides, would cause overflow when "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment