Code:
08048000-0817d000 r-xp 00000000 fe:00 110100910 /mnt/cobra/Spellen/cod2/cod2_lnxded
0817d000-08189000 rw-p 00134000 fe:00 110100910 /mnt/cobra/Spellen/cod2/cod2_lnxded
The first two lines represent the memory of cod2, the 1nd is already in libcod:
https://github.com/kungfooman/libcod...ter/libcod.cpp
PHP Code:
mprotect((void *)0x08048000, 0x135000, PROT_READ | PROT_WRITE | PROT_EXEC);
0x135000 is calculated by 0817d000 - 08048000.
Try to add this mprotect:
PHP Code:
mprotect((void *)0x08048000, 0x135000, PROT_READ | PROT_WRITE | PROT_EXEC);
mprotect((void *)0x0817d000, 0xC000, PROT_READ | PROT_WRITE | PROT_EXEC);