From f2a4c093041fc337c83ef6130cf66464aae9ff30 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 26 Jun 2021 03:39:48 +0100 Subject: [PATCH] Corrected bug in GDB RSP write general registers (P) packet validation --- src/DebugServers/GdbRsp/CommandPackets/WriteGeneralRegister.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DebugServers/GdbRsp/CommandPackets/WriteGeneralRegister.cpp b/src/DebugServers/GdbRsp/CommandPackets/WriteGeneralRegister.cpp index 81b237ec..d323b330 100644 --- a/src/DebugServers/GdbRsp/CommandPackets/WriteGeneralRegister.cpp +++ b/src/DebugServers/GdbRsp/CommandPackets/WriteGeneralRegister.cpp @@ -9,7 +9,7 @@ void WriteGeneralRegister::init() { // The P packet updates a single register auto packet = std::string(this->data.begin(), this->data.end()); - if (packet.size() < 6) { + if (packet.size() < 4) { throw Exception("Invalid P command packet - insufficient data in packet."); }