diff options
author | van Hauser <vh@thc.org> | 2020-05-01 01:03:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 01:03:53 +0200 |
commit | bb7d2a734773ee1a6411be46fb0889510c07ecbb (patch) | |
tree | c7a18673841e2c68739a9401080da180263972cf /examples | |
parent | 9d03763d942c19ac9c6cbe7d6a3f3cecba65abad (diff) | |
parent | 3cf4529f3ca50479f1f91b49be8a5e9c54d4588e (diff) | |
download | afl++-bb7d2a734773ee1a6411be46fb0889510c07ecbb.tar.gz |
Merge pull request #345 from devnexen/afl_untracer_libs_display
afl-untracer little change to display libraries mapping on FreeBSD.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/afl_untracer/afl-untracer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/afl_untracer/afl-untracer.c b/examples/afl_untracer/afl-untracer.c index 275df320..9f9ea3f1 100644 --- a/examples/afl_untracer/afl-untracer.c +++ b/examples/afl_untracer/afl-untracer.c @@ -169,11 +169,12 @@ void read_library_information() { if (debug) fprintf(stderr, "\n"); #elif defined(__FreeBSD__) - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, -1}; + int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()}; char *buf, *start, *end; size_t miblen = sizeof(mib) / sizeof(mib[0]); size_t len; + if (debug) fprintf(stderr, "Library list:\n"); if (sysctl(mib, miblen, NULL, &len, NULL, 0) == -1) { return; |