aboutsummaryrefslogtreecommitdiff
path: root/afl-fuzz.c
diff options
context:
space:
mode:
authorJoey Jiao <joeyjiaojg@163.com>2019-07-25 09:12:48 +0800
committerJoey Jiao <joeyjiaojg@163.com>2019-08-19 19:43:58 +0800
commit742aed4f2e8d46cd9a92c4eafb89986049bedfe4 (patch)
tree67c370d871395b83cd3e8d5c765019d9419a9088 /afl-fuzz.c
parent53012ff41cf522f96c206a0ed068e1de7e8c062f (diff)
downloadafl++-742aed4f2e8d46cd9a92c4eafb89986049bedfe4.tar.gz
Add support for Android
Diffstat (limited to 'afl-fuzz.c')
-rw-r--r--afl-fuzz.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/afl-fuzz.c b/afl-fuzz.c
index e9fb8bf0..0e252bea 100644
--- a/afl-fuzz.c
+++ b/afl-fuzz.c
@@ -28,6 +28,9 @@
#endif
#define _FILE_OFFSET_BITS 64
+#ifdef __ANDROID__
+ #include "android-ashmem.h"
+#endif
#include "config.h"
#include "types.h"
#include "debug.h"
@@ -11318,6 +11321,7 @@ static void check_term_size(void) {
if (ioctl(1, TIOCGWINSZ, &ws)) return;
+ if (ws.ws_row == 0 || ws.ws_col == 0) return;
if (ws.ws_row < 24 || ws.ws_col < 79) term_too_small = 1;
}
@@ -12370,8 +12374,8 @@ int main(int argc, char** argv) {
if (unicorn_mode) FATAL("-U and -n are mutually exclusive");
}
-
- if (index(argv[optind], '/') == NULL) WARNF(cLRD "Target binary called without a prefixed path, make sure you are fuzzing the right binary: " cRST "%s", argv[optind]);
+
+ if (strchr(argv[optind], '/') == NULL) WARNF(cLRD "Target binary called without a prefixed path, make sure you are fuzzing the right binary: " cRST "%s", argv[optind]);
OKF("afl++ is maintained by Marc \"van Hauser\" Heuse, Heiko \"hexcoder\" Eissfeldt and Andrea Fioraldi");
OKF("afl++ is open source, get it at https://github.com/vanhauser-thc/AFLplusplus");