Skip to content

Commit

Permalink
source/wnnm.cpp: fix out of range access
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Dec 13, 2022
1 parent 9918a1e commit c13bbe2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/wnnm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,8 +1646,10 @@ static void VS_CC WNNMCreate(
process[i] = false;
}
}
for (int i = num_sigma_args; i < 3; ++i) {
process[i] = process[i - 1];
if (num_sigma_args > 0) { // num_sigma_args may be -1
for (int i = num_sigma_args; i < 3; ++i) {
process[i] = process[i - 1];
}
}

bool skip = true;
Expand Down

0 comments on commit c13bbe2

Please sign in to comment.