fixed qbdi mode to work out of the box

This commit is contained in:
w1redch4d 2025-04-10 19:21:14 +05:30
parent 5a527046a5
commit 3c8016e071
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ int shmctl(int __shmid, int __cmd, struct shmid_ds *__buf) {
int ret = 0; int ret = 0;
if (__cmd == IPC_RMID) { if (__cmd == IPC_RMID) {
int length = ioctl(__shmid, ASHMEM_GET_SIZE, NULL); unsigned int length = ioctl(__shmid, ASHMEM_GET_SIZE, NULL);
struct ashmem_pin pin = {0, length}; struct ashmem_pin pin = {0, length};
ret = ioctl(__shmid, ASHMEM_UNPIN, &pin); ret = ioctl(__shmid, ASHMEM_UNPIN, &pin);
close(__shmid); close(__shmid);

View File

@ -11,12 +11,12 @@
#include <dlfcn.h> #include <dlfcn.h>
#ifdef __ANDROID__ #ifdef __ANDROID__
#include "../include/android-ashmem.h" #include "../../include/android-ashmem.h"
#endif #endif
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
#include "../config.h" #include "../../config.h"
#include <QBDI.h> #include <QBDI.h>
@ -81,7 +81,7 @@ static void afl_forkserver() {
while (1) { while (1) {
int status; int status;
u32 was_killed; unsigned int was_killed;
// wait for afl-fuzz // wait for afl-fuzz
if (read(FORKSRV_FD, &was_killed, 4) != 4) exit(2); if (read(FORKSRV_FD, &was_killed, 4) != 4) exit(2);