speed: range check the argument given to -multi
authorPauli <pauli@openssl.org>
Mon, 25 Oct 2021 01:16:01 +0000 (11:16 +1000)
committerPauli <pauli@openssl.org>
Tue, 26 Oct 2021 22:26:12 +0000 (08:26 +1000)
commit7220085f22cf6c49933ea8287eb15db57f7ab0db
treed440899f0e3d28bb6385c9c52fe440da4c1f50fa
parent089df6f135b7cef4e7d0e7b7acecb1d90f5ef3ed
speed: range check the argument given to -multi

For machines where sizeof(size_t) == sizeof(int) there is a possible overflow
which could cause a crash.

For machines where sizeof(size_t) > sizeof(int), the existing checks adequately
detect the situation.

Fixes #16899

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16904)
apps/speed.c