Check that async_jobs is not negative and not too high.
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2693)
This commit is contained in:
parent
607c926856
commit
f8aa15728b
1 changed files with 7 additions and 1 deletions
|
@ -1214,7 +1214,7 @@ int speed_main(int argc, char **argv)
|
||||||
#ifndef NO_FORK
|
#ifndef NO_FORK
|
||||||
int multi = 0;
|
int multi = 0;
|
||||||
#endif
|
#endif
|
||||||
int async_jobs = 0;
|
unsigned int async_jobs = 0;
|
||||||
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) \
|
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) \
|
||||||
|| !defined(OPENSSL_NO_EC)
|
|| !defined(OPENSSL_NO_EC)
|
||||||
long rsa_count = 1;
|
long rsa_count = 1;
|
||||||
|
@ -1393,6 +1393,12 @@ int speed_main(int argc, char **argv)
|
||||||
prog);
|
prog);
|
||||||
goto opterr;
|
goto opterr;
|
||||||
}
|
}
|
||||||
|
if (async_jobs > 99999) {
|
||||||
|
BIO_printf(bio_err,
|
||||||
|
"%s: too many async_jobs\n",
|
||||||
|
prog);
|
||||||
|
goto opterr;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case OPT_MISALIGN:
|
case OPT_MISALIGN:
|
||||||
|
|
Loading…
Reference in a new issue