aldelaro5 / dolphin-memory-engine

A RAM search made specifically to search, monitor and edit the Dolphin emulator's emulated memory
MIT License
158 stars 36 forks source link

Avoid prematurely freeing buffer during value editing on Linux. #141

Closed cristian64 closed 1 month ago

cristian64 commented 1 month ago

This was a regression in d58cd7687e272a576e49c, where the deletion of the bufferCopy buffer was moved to an earlier point. It was overlooked that the buffer is referenced by the local structure that used in the process_vm_writev() call.

The symptoms were garbage being written into Dolphin's memory when the user would edit a value in a watch node (e.g. user enters 7 in a integer, but 251 was written).

Bonus: Some wrong assertions (a regression too, in e9c0e22ed31) have been removed.