about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 1030dfdf..50874f47 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -404,6 +404,12 @@ nyx_plugin_handler_t *afl_load_libnyx_plugin(u8 *libnyx_binary) {
   plugin->nyx_new = dlsym(handle, "nyx_new");
   if (plugin->nyx_new == NULL) { goto fail; }
 
+  plugin->nyx_new_parent = dlsym(handle, "nyx_new_parent");
+  if (plugin->nyx_new_parent == NULL) { goto fail; }
+
+  plugin->nyx_new_child = dlsym(handle, "nyx_new_child");
+  if (plugin->nyx_new_child == NULL) { goto fail; }
+
   plugin->nyx_shutdown = dlsym(handle, "nyx_shutdown");
   if (plugin->nyx_shutdown == NULL) { goto fail; }
 
@@ -1321,8 +1327,7 @@ int main(int argc, char **argv_orig, char **envp) {
   #ifdef __linux__
   if (afl->fsrv.nyx_mode) {
 
-    if (afl->fsrv.nyx_standalone &&
-        strncmp(afl->sync_id, "default", strlen("default")) != 0) {
+    if (afl->fsrv.nyx_standalone && strcmp(afl->sync_id, "default") != 0) {
 
       FATAL(
           "distributed fuzzing is not supported in this Nyx mode (use -Y "
@@ -1334,14 +1339,15 @@ int main(int argc, char **argv_orig, char **envp) {
 
       if (afl->is_main_node) {
 
-        if (strncmp("0", afl->sync_id, strlen("0") != 0)) {
+        if (strcmp("0", afl->sync_id) != 0) {
 
           FATAL(
               "for Nyx -Y mode, the Main (-M) parameter has to be set to 0 (-M "
               "0)");
 
         }
-
+        
+        afl->fsrv.nyx_parent = true;
         afl->fsrv.nyx_id = 0;
 
       }