aboutsummaryrefslogtreecommitdiff
path: root/afl-cmin.bash
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2022-08-15 18:31:45 +0200
committervanhauser-thc <vh@thc.org>2022-08-15 18:31:45 +0200
commitba14c353c07d19ad37916947708a9c26537c6d62 (patch)
treed348fdd12744e2d5439c54196d6e4bf74a62b5e4 /afl-cmin.bash
parentf00d83afbc1b3e82c61ada6b1834eb0f7312e863 (diff)
downloadAFLplusplus-ba14c353c07d19ad37916947708a9c26537c6d62.tar.gz
get map size from binaries within afl-cmin*
Diffstat (limited to 'afl-cmin.bash')
-rwxr-xr-xafl-cmin.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/afl-cmin.bash b/afl-cmin.bash
index 9ac65199..db3e8ae5 100755
--- a/afl-cmin.bash
+++ b/afl-cmin.bash
@@ -215,6 +215,12 @@ if [ ! -f "$TARGET_BIN" -o ! -x "$TARGET_BIN" ]; then
fi
+MAPSIZE=`AFL_DUMP_MAP_SIZE=1 "./$TARGET_BIN" 2>/dev/null`
+test -n "$MAPSIZE" && {
+ export AFL_MAP_SIZE=$MAPSIZE
+ echo "[+] Setting AFL_MAP_SIZE=$MAPSIZE"
+}
+
if [ "$AFL_SKIP_BIN_CHECK" = "" -a "$QEMU_MODE" = "" -a "$FRIDA_MODE" = "" -a "$UNICORN_MODE" = "" ]; then
if ! grep -qF "__AFL_SHM_ID" "$TARGET_BIN"; then