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.
This commit is contained in:
Stephen Miller 2025-05-02 12:59:24 -05:00
parent 5c0f712660
commit f96089638e

View file

@ -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);