Commit 5fe7721
committed
[lldb] Adjust the for loop condition to prevent unintended increments in ExpandRLE (NFC)
Address the issue reported by static analyser cppcheck regarding missing bounds check for extra iterator increment in a loop.
This could lead to accessing out-of-bounds memory. To fix this we have adjusted the loop conditions to not incrementing iterator c there..
Caught by cppcheck -
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:1300:75: warning: Missing bounds check for extra iterator increment in loop. [StlMissingComparison]
Fix #912251 parent 1c0063b commit 5fe7721
File tree
1 file changed
+2
-1
lines changed- lldb/source/Plugins/Process/gdb-remote
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | | - | |
| 1300 | + | |
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
| 1319 | + | |
1319 | 1320 | | |
1320 | 1321 | | |
1321 | 1322 | | |
0 commit comments