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:58:53 +0000 (09:58 +0000)
commit1b25dc0cf3674dadab8ff13c8de1679910c047d2
tree689be981328baa1a5db34c316c2fea52134e0261
parent9c931841e522943fc226a06947b9959be0d53551
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)

(cherry picked from commit 9fc8f18f59f4a4c853466dca64a23b8af681bf1c)
test/ecdsatest.c