We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fe7721 commit b655f64Copy full SHA for b655f64
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -1298,7 +1298,7 @@ std::string GDBRemoteCommunication::ExpandRLE(std::string packet) {
1298
std::string decoded;
1299
decoded.reserve(packet.size());
1300
for (std::string::const_iterator c = packet.begin(); c != packet.end();) {
1301
- if (*c == '*') {
+ if (*c == '*' && std::next(c) != packet.end()) {
1302
// '*' indicates RLE. Next character will give us the repeat count and
1303
// previous character is what is to be repeated.
1304
char char_to_repeat = decoded.back();
0 commit comments