diff options
author | jsing <> | 2014-08-27 15:54:02 +0000 |
---|---|---|
committer | jsing <> | 2014-08-27 15:54:02 +0000 |
commit | 809f43040a62797ab71961c1b3812627db0b5cef (patch) | |
tree | ce27f73a3621f47fc9f089d37a6f0f954828bc88 /src | |
parent | c5509750f2f6ceb6b0744ad9ddcfbc989e815932 (diff) | |
download | openbsd-809f43040a62797ab71961c1b3812627db0b5cef.tar.gz openbsd-809f43040a62797ab71961c1b3812627db0b5cef.tar.bz2 openbsd-809f43040a62797ab71961c1b3812627db0b5cef.zip |
Reset the config struct before calling options_parse(), otherwise config
options from the previous run stick in interactive mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/rand.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
1 | /* $OpenBSD: rand.c,v 1.2 2014/08/27 14:59:44 jsing Exp $ */ | 1 | /* $OpenBSD: rand.c,v 1.3 2014/08/27 15:54:02 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -122,6 +122,8 @@ rand_main(int argc, char **argv) | |||
122 | int i, r; | 122 | int i, r; |
123 | BIO *out = NULL; | 123 | BIO *out = NULL; |
124 | 124 | ||
125 | memset(&rand_config, 0, sizeof(rand_config)); | ||
126 | |||
125 | if (options_parse(argc, argv, rand_options, &num_bytes) != 0) { | 127 | if (options_parse(argc, argv, rand_options, &num_bytes) != 0) { |
126 | rand_usage(); | 128 | rand_usage(); |
127 | return (1); | 129 | return (1); |