Closed Kylogias closed 2 years ago
I just looked at the code and it looks like it doesn't.
emu_memcpy
is protected against writing out of memory by the ppeek
function in common/jdh8.h
where this lines appears :
if (addr >= ADDR_MB) {
return &((u8 *) state->special.raw)[addr - ADDR_MB];
Here I think the only thing that could happen is that the memory would be overwritten.
Not a memory leak, but this should warn. Fixed in b5f7827e6181a5b37533012aad7acfc7881f4707, thanks!
There is a possible memory leak in the
load
function ofemu/libemu.c
where the file may be bigger than 32K (the size of ROM) or even 64K (the size of the entire memory). This can leave to corrupted data when, for example, the screen is reading from memory, or another process modifies memory, or even the PROGRAM ITSELF modifies memory as it'll have an unknown size when assembled, thus you may read into/from memory that has program code