Skip to content

Commit afd7d6b

Browse files
[1.8>master] [MERGE #4400 @Penguinwizzard] Tell PREfast about iterator bounds.
Merge pull request #4400 from Penguinwizzard:prefast_wasmbinaryreader We know that the iterator will iterate over Count() elements, so we can tell PREfast to assume that.
2 parents 72836e0 + c8d1549 commit afd7d6b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/WasmReader/WasmBinaryReader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ void WasmBinaryReader::PrintOps()
239239
int i = 0;
240240
while (iter.IsValid())
241241
{
242+
__analysis_assume(i < count);
242243
ops[i] = iter.CurrentKey();
243244
iter.MoveNext();
244245
++i;

0 commit comments

Comments
 (0)