summaryrefslogtreecommitdiff
path: root/regress/misc/kexfuzz/kexfuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/misc/kexfuzz/kexfuzz.c')
-rw-r--r--regress/misc/kexfuzz/kexfuzz.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/regress/misc/kexfuzz/kexfuzz.c b/regress/misc/kexfuzz/kexfuzz.c
index 7051e87b1..56697c918 100644
--- a/regress/misc/kexfuzz/kexfuzz.c
+++ b/regress/misc/kexfuzz/kexfuzz.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexfuzz.c,v 1.5 2019/01/21 12:50:12 djm Exp $ */ 1/* $OpenBSD: kexfuzz.c,v 1.6 2020/01/26 00:09:50 djm Exp $ */
2/* 2/*
3 * Fuzz harness for KEX code 3 * Fuzz harness for KEX code
4 * 4 *
@@ -424,12 +424,8 @@ main(int argc, char **argv)
424 if (packet_index == -1 || direction == -1 || data_path == NULL) 424 if (packet_index == -1 || direction == -1 || data_path == NULL)
425 badusage("Replace (-r) mode must specify direction " 425 badusage("Replace (-r) mode must specify direction "
426 "(-D) packet index (-i) and data path (-f)"); 426 "(-D) packet index (-i) and data path (-f)");
427 if ((fd = open(data_path, O_RDONLY)) == -1) 427 if ((r = sshbuf_load_file(data_path, &replace_data)) != 0)
428 err(1, "open %s", data_path);
429 replace_data = sshbuf_new();
430 if ((r = sshkey_load_file(fd, replace_data)) != 0)
431 errx(1, "read %s: %s", data_path, ssh_err(r)); 428 errx(1, "read %s: %s", data_path, ssh_err(r));
432 close(fd);
433 } 429 }
434 430
435 /* Dump mode */ 431 /* Dump mode */