Skip to content

Commit

Permalink
Fix potential vector out of bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Asd-g committed Feb 25, 2023
1 parent bb338f3 commit bdb69b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DoViBaker/DoViProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ uint16_t DoViProcessor::processSample(int cmp, uint16_t bl, uint16_t el, uint16_
}

int DoViProcessor::getPivotIndex(int cmp, uint16_t s) const {
int pivot_idx = num_pivots_minus1[cmp];
int pivot_idx = num_pivots_minus1[cmp] - 1;
for (int idx = 0; idx < num_pivots_minus1[cmp]; idx++) {
if (s < pivot_value[cmp][idx + 1]) {
pivot_idx = idx;
Expand Down

0 comments on commit bdb69b8

Please sign in to comment.