mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 20:45:35 -04:00
Fix potential out-of-bounds access in TimeFilter (#2532)
This commit is contained in:
parent
610a5d8c34
commit
bc4e95127c
1 changed files with 2 additions and 1 deletions
|
|
@ -80,10 +80,11 @@ void TimeFilter::get_all_bins(
|
|||
if (t_end < bins_[i_bin + 1])
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
} else if (t_end < bins_.back()) {
|
||||
// -------------------------------------------------------------------------
|
||||
// For collision estimator or surface tallies, find a match based on the
|
||||
// exact time of the particle
|
||||
|
||||
const auto i_bin = lower_bound_index(bins_.begin(), bins_.end(), t_end);
|
||||
match.bins_.push_back(i_bin);
|
||||
match.weights_.push_back(1.0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue