srounet / Pymem

A python library for windows, providing the needed functions to start working on your own with memory editing.
MIT License
303 stars 45 forks source link

Wrong use of the length of the bytes being written #103

Closed v01d-gh closed 1 year ago

v01d-gh commented 1 year ago

https://github.com/srounet/Pymem/blob/2e043fe8273ab9607ad7f11605fdd5a337514ba2/pymem/memory.py#L608

Today I discovered that I was corrupting the process memory when writing. Began to look for an error, found out that the problem is here. Agree that writing even one byte, if the length is 0, will be incorrect.