Fix handle_query_internal to only write to buffer on success (#382)

Fix for
https://github.com/momo5502/sogen/pull/381#discussion_r2147511758
This commit is contained in:
Maurice Heumann
2025-06-15 13:18:46 +02:00
committed by GitHub

View File

@@ -223,7 +223,10 @@ NTSTATUS handle_query_internal(x86_64_emulator& emu, const uint64_t buffer, cons
action(obj);
}
emu.write_memory(buffer, obj);
if (result == STATUS_SUCCESS)
{
emu.write_memory(buffer, obj);
}
return result;
}