[Lldb-commits] [lldb] [lldb] Adjust the for loop condition to prevent unintended increments in ExpandRLE (NFC) (PR #94844)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 20 11:38:33 PDT 2024


================
@@ -1316,6 +1316,7 @@ std::string GDBRemoteCommunication::ExpandRLE(std::string packet) {
     } else {
----------------
bulbazord wrote:

I can't comment on it for some reason, but above this else is an `else if (*c == 0x7d)`. That block also does `*++c`, which will also go out of bounds if `std::next(c) == packet.end()`. You need to add a check there too, don't you?

https://github.com/llvm/llvm-project/pull/94844


More information about the lldb-commits mailing list