ps4debug icon indicating copy to clipboard operation
ps4debug copied to clipboard

cast size_t to int32_t for vector::size

Open ate47 opened this issue 8 months ago • 0 comments

Hello,

In the C++ libdebug code, the write methods are using size_t vector::size(), but the size of size_t isn't 4 bytes by default. In my version sizeof(size_t) = 8, so it was creating a buffer overflow.

This PR fixes it for the LoadElf/KernelWriteMemory/WriteMemory methods, but maybe it's used somewhere else.

Thanks for the lib itself.

ate47 avatar Oct 10 '23 16:10 ate47