From 7e110ee8f7f25966fc106aef1386ff8a70446a26 Mon Sep 17 00:00:00 2001 From: jam1garner <8260240+jam1garner@users.noreply.github.com> Date: Tue, 2 Nov 2021 00:10:54 -0400 Subject: [PATCH] dmnt2: fix missing null-terminator for invalid command error --- stratosphere/dmnt.gen2/source/dmnt2_gdb_server_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratosphere/dmnt.gen2/source/dmnt2_gdb_server_impl.cpp b/stratosphere/dmnt.gen2/source/dmnt2_gdb_server_impl.cpp index 36b390efb..0fa255fec 100644 --- a/stratosphere/dmnt.gen2/source/dmnt2_gdb_server_impl.cpp +++ b/stratosphere/dmnt.gen2/source/dmnt2_gdb_server_impl.cpp @@ -2061,7 +2061,7 @@ namespace ams::dmnt { SetReply(m_buffer, "[TODO] wait for program id 0x%lx\n", program_id); } else { SetReply(m_reply_packet, "Unknown command `%s`\n", command); - std::memcpy(m_buffer, m_reply_packet, std::strlen(m_reply_packet)); + std::memcpy(m_buffer, m_reply_packet, std::strlen(m_reply_packet) + 1); } }