apps/speed: fix possible OOB access in some EC arrays
authorFdaSilvaYY <fdasilvayy@gmail.com>
Sun, 29 Apr 2018 23:13:58 +0000 (01:13 +0200)
committerAndy Polyakov <appro@openssl.org>
Sat, 12 May 2018 18:16:40 +0000 (20:16 +0200)
commit5c6a69f539a5eb66a1afa4e2904d8a27e9b534c3
tree9912b3d4011a51ad118e6599cf1ab9bbc66358cc
parent5f96a95e2562f026557f625e50c052e77c7bc2e8
apps/speed: fix possible OOB access in some EC arrays

because there are actually 18 curves defined, but only 16 are plugged for
ecdsa test.
Deduce array size using OSSL_NELEM and so remove various magic numbers,
which required some declarations moving.
Implement OPT_PAIR list search without a null-ending element.
Fix some comparison between signed and unsigned integer expressions.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6133)
apps/speed.c