From 809f43040a62797ab71961c1b3812627db0b5cef Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 27 Aug 2014 15:54:02 +0000 Subject: Reset the config struct before calling options_parse(), otherwise config options from the previous run stick in interactive mode. --- src/usr.bin/openssl/rand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/usr.bin') diff --git a/src/usr.bin/openssl/rand.c b/src/usr.bin/openssl/rand.c index 61c7013340..cfb8d763b0 100644 --- a/src/usr.bin/openssl/rand.c +++ b/src/usr.bin/openssl/rand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rand.c,v 1.2 2014/08/27 14:59:44 jsing Exp $ */ +/* $OpenBSD: rand.c,v 1.3 2014/08/27 15:54:02 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -122,6 +122,8 @@ rand_main(int argc, char **argv) int i, r; BIO *out = NULL; + memset(&rand_config, 0, sizeof(rand_config)); + if (options_parse(argc, argv, rand_options, &num_bytes) != 0) { rand_usage(); return (1); -- cgit v1.2.3-55-g6feb