Skip to content

Commit

Permalink
Merge pull request #467 from obergaba/develop
Browse files Browse the repository at this point in the history
fix: Prevent out-of-bounds access in ceilSearch function
  • Loading branch information
chassis-community authored May 16, 2024
2 parents 522e303 + 65de4ce commit a43bae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ccapi_cpp/ccapi_util_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ int ceilSearch(const std::vector<T>& c, int low, int high, T x) {
if (x <= c[low]) {
return low;
}
for (i = low; i < high; i++) {
for (i = low; i < high - 1; i++) {
if (c[i] == x) {
return i;
}
Expand Down

0 comments on commit a43bae1

Please sign in to comment.