params_dup: fix off by one error that allows array overreach.
authorPauli <pauli@openssl.org>
Sun, 18 Apr 2021 23:50:52 +0000 (09:50 +1000)
committerPauli <pauli@openssl.org>
Tue, 20 Apr 2021 22:57:42 +0000 (08:57 +1000)
commit4ecb19d1092d6db1397aa24512996f98f8e5e268
tree3d37d8b124bb9b0f28df9d67c3a544ea6b5e866c
parent1c0eede9827b0962f1d752fa4ab5d436fa039da4
params_dup: fix off by one error that allows array overreach.

The end of loop test allows the index to go one step too far to be able to
terminate the param array but the end of list record is still added.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14922)
crypto/params_dup.c