diff options
author | Pauli <pauli@openssl.org> | 2021-10-27 08:30:51 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-10-28 18:08:21 +1000 |
commit | 886e6855c3fd5ea977b36afea5a2aa31b7cdd01c (patch) | |
tree | 076105dfeca037b815d1010c75951f88bafe0109 /apps | |
parent | c03fa13e4ab4c27ef22284e56e6ddb43798e5874 (diff) |
speed: range check the argument given to -multi for 1.1.1
Fixes #16899 for 1.1.1 branch.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16922)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/speed.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/speed.c b/apps/speed.c index d4ae7ab7bf..7f2d3165f9 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -1590,6 +1590,10 @@ int speed_main(int argc, char **argv) case OPT_MULTI: #ifndef NO_FORK multi = atoi(opt_arg()); + if (multi >= INT_MAX / (int)sizeof(int)) { + BIO_printf(bio_err, "%s: multi argument too large\n", prog); + return 0; + } #endif break; case OPT_ASYNCJOBS: |