From 35687018eb634ea329609c86d9ed476bb79c0e91 Mon Sep 17 00:00:00 2001 From: Thiadmer Riemersma Date: Tue, 31 Aug 2021 11:41:00 +0200 Subject: [PATCH] Escape '*' in responses of the Remote Serial Protocol, to avoid that it is interpreted as the start of an RLE sequence --- src/gdb_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gdb_packet.c b/src/gdb_packet.c index 6f31e138..41920f26 100644 --- a/src/gdb_packet.c +++ b/src/gdb_packet.c @@ -158,7 +158,7 @@ void gdb_putpacket(const char *packet, int size) else DEBUG_GDB_WIRE("\\x%02X", c); #endif - if((c == '$') || (c == '#') || (c == '}')) { + if((c == '$') || (c == '#') || (c == '}') || (c == '*')) { gdb_if_putchar('}', 0); gdb_if_putchar(c ^ 0x20, 0); csum += '}' + (c ^ 0x20);