Skip to content

Commit e87ae37

Browse files
<regex>: Silence CodeQL false positive warning (#5072)
1 parent c18bcea commit e87ae37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stl/inc/regex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3567,6 +3567,7 @@ bool _Matcher<_BidIt, _Elem, _RxTraits, _It>::_Match_pat(_Node_base* _Nx) { // c
35673567
{ // record current position
35683568
_Node_capture* _Node = static_cast<_Node_capture*>(_Nx);
35693569
_Tgt_state._Grps[_Node->_Idx]._Begin = _Tgt_state._Cur;
3570+
// CodeQL [SM02323] Comparing unchanging unsigned int _Node->_Idx to decreasing size_t _Idx is safe.
35703571
for (size_t _Idx = _Tgt_state._Grp_valid.size(); _Node->_Idx < _Idx;) {
35713572
_Tgt_state._Grp_valid[--_Idx] = false;
35723573
}

0 commit comments

Comments
 (0)