From f96089638eb4910fd0bd00410fb2f6f2845e3a4f Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Fri, 2 May 2025 12:59:24 -0500 Subject: [PATCH] strncpy instead of strcpy Hardcoded the constant size for now, I need to review how real hardware behaves here to determine if anything else is necessary for this to be accurate. --- src/core/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index b667b87cb..4c10f7a1f 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -615,7 +615,7 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags, info->is_pooled = vma.type == VMAType::PoolReserved || vma.type == VMAType::Pooled ? 1 : 0; info->is_committed = vma.IsMapped() ? 1 : 0; - strcpy(info->name, vma.name.data()); + strncpy(info->name, vma.name.data(), 32); if (vma.type == VMAType::Direct) { const auto dmem_it = FindDmemArea(vma.phys_base);