about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-03-01 09:57:57 +0100
committervanhauser-thc <vh@thc.org>2021-03-01 09:57:57 +0100
commit4619a1395b9a414e5e11148d79fde3a7fa348e87 (patch)
tree76446345dee62e9a9948556bd88e54d424710029 /src
parent0c38850f955a608529bdd02cc39dc68713ef8528 (diff)
downloadafl++-4619a1395b9a414e5e11148d79fde3a7fa348e87.tar.gz
ensure proper aligning for skim patch
Diffstat (limited to 'src')
-rw-r--r--src/afl-common.c2
-rw-r--r--src/afl-forkserver.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/afl-common.c b/src/afl-common.c
index fa4aec7f..a306fe5e 100644
--- a/src/afl-common.c
+++ b/src/afl-common.c
@@ -1135,7 +1135,7 @@ u32 get_map_size(void) {
 
     }
 
-    if (map_size % 32) { map_size = (((map_size >> 5) + 1) << 5); }
+    if (map_size % 64) { map_size = (((map_size >> 6) + 1) << 6); }
 
   }
 
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index 9ee59822..fd5edc98 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -656,11 +656,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
 
         if (!fsrv->map_size) { fsrv->map_size = MAP_SIZE; }
 
-        if (unlikely(tmp_map_size % 32)) {
+        if (unlikely(tmp_map_size % 64)) {
 
           // should not happen
           WARNF("Target reported non-aligned map size of %u", tmp_map_size);
-          tmp_map_size = (((tmp_map_size + 31) >> 5) << 5);
+          tmp_map_size = (((tmp_map_size + 63) >> 6) << 6);
 
         }