From f73ab8a811bc874c2fb403012aa8e4bfdcaf5ec7 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Sun, 26 Jan 2020 00:09:50 +0000 Subject: upstream: unbreak unittests for recent API / source file changes OpenBSD-Regress-ID: 075a899a01bbf7781d38bf0b33d8366faaf6d3c0 --- regress/misc/kexfuzz/kexfuzz.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'regress/misc/kexfuzz/kexfuzz.c') 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 @@ -/* $OpenBSD: kexfuzz.c,v 1.5 2019/01/21 12:50:12 djm Exp $ */ +/* $OpenBSD: kexfuzz.c,v 1.6 2020/01/26 00:09:50 djm Exp $ */ /* * Fuzz harness for KEX code * @@ -424,12 +424,8 @@ main(int argc, char **argv) if (packet_index == -1 || direction == -1 || data_path == NULL) badusage("Replace (-r) mode must specify direction " "(-D) packet index (-i) and data path (-f)"); - if ((fd = open(data_path, O_RDONLY)) == -1) - err(1, "open %s", data_path); - replace_data = sshbuf_new(); - if ((r = sshkey_load_file(fd, replace_data)) != 0) + if ((r = sshbuf_load_file(data_path, &replace_data)) != 0) errx(1, "read %s: %s", data_path, ssh_err(r)); - close(fd); } /* Dump mode */ -- cgit v1.2.3