Use order not degree to calculate a buffer size in ecdsatest
authorMatt Caswell <matt@openssl.org>
Thu, 14 Feb 2019 12:21:20 +0000 (12:21 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 15 Feb 2019 09:54:59 +0000 (09:54 +0000)
commit9fc8f18f59f4a4c853466dca64a23b8af681bf1c
treec97cd8a0d15ac9f8f9a37162131acde7580f34cb
parent0cf5c6a9a06b58a85d93aafefbc07039773b5b43
Use order not degree to calculate a buffer size in ecdsatest

Otherwise this can result in an incorrect calculation of the maximum
encoded integer length, meaning an insufficient buffer size is allocated.

Thanks to Billy Brumley for helping to track this down.

Fixes #8209

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8237)
test/ecdsatest.c