Skip to content

Commit 8d58a15

Browse files
committed
UefiExt: Use String Len Not Sizeof
When calculating what to print when a truncated message is sent from the debugger, UefiExt was using sizeof(CHAR8 *) which ended up removing valid characters that the target debugger had sent. This fixes it to use the length, not size of the pointer.
1 parent 8ea1052 commit 8d58a15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UefiDbgExt/swdebug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ monitor (
174174
if (Len > TruncateTagLen) {
175175
if (strncmp (Response + Len - TruncateTagLen, TruncateTag, TruncateTagLen) == 0) {
176176
// The response was truncated, so we need to read more.
177-
Response[Len - sizeof (TruncateTag)] = 0; // Remove the truncate tag.
177+
Response[Len - TruncateTagLen] = 0; // Remove the truncate tag.
178178
dprintf ("%s", Response);
179179
Offset += Len - TruncateTagLen;
180180
continue;

0 commit comments

Comments
 (0)