fix some compiler warnings in 32-bit linux

This commit is contained in:
hexcoder-
2021-10-02 22:47:22 +02:00
parent d668f9697c
commit e80131bef5
8 changed files with 19 additions and 14 deletions

View File

@ -44,8 +44,9 @@ static void gum_afl_stalker_backpatcher_notify(GumStalkerObserver *self,
sizeof(prefetch_data->backpatch_data) - prefetch_data->backpatch_size;
if (sizeof(gsize) + size > remaining) { return; }
*(gsize *)(&prefetch_data->backpatch_data[prefetch_data->backpatch_size]) =
size;
gsize *dst_backpatch_size = (gsize *)
&prefetch_data->backpatch_data[prefetch_data->backpatch_size];
*dst_backpatch_size = size;
prefetch_data->backpatch_size += sizeof(gsize);
memcpy(&prefetch_data->backpatch_data[prefetch_data->backpatch_size],
@ -115,7 +116,8 @@ static void prefetch_read_patches(void) {
remaining > sizeof(gsize);
remaining = prefetch_data->backpatch_size - offset) {
gsize size = *(gsize *)(&prefetch_data->backpatch_data[offset]);
gsize *src_backpatch_data = (gsize *)&prefetch_data->backpatch_data[offset];
gsize size = *src_backpatch_data;
offset += sizeof(gsize);
if (prefetch_data->backpatch_size - offset < size) {