Fix side effect of icordbg (#51264)
authorThays Grazia <thaystg@gmail.com>
Thu, 15 Apr 2021 12:37:50 +0000 (09:37 -0300)
committerGitHub <noreply@github.com>
Thu, 15 Apr 2021 12:37:50 +0000 (08:37 -0400)
src/mono/mono/mini/debugger-agent.c

index 25a90cc..1d36ab7 100644 (file)
@@ -6623,7 +6623,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
        case CMD_VM_SET_PROTOCOL_VERSION: {
                major_version = decode_int (p, &p, end);
                minor_version = decode_int (p, &p, end);
-               if (p <= end)
+               if (p < end)
                        using_icordbg = decode_byte (p, &p, end);
                protocol_version_set = TRUE;
                PRINT_DEBUG_MSG (1, "[dbg] Protocol version %d.%d, client protocol version %d.%d.\n", MAJOR_VERSION, MINOR_VERSION, major_version, minor_version);