Fix some undefined behaviour in the Curve448 code (2nd attempt)
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Wed, 1 Aug 2018 19:50:41 +0000 (21:50 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 3 Aug 2018 10:02:14 +0000 (12:02 +0200)
commit28c5b7d482dda8597bbf93890463d7eb0f9f2355
tree5beea77ec0d3511754413fcf41ce55248d170d73
parentd8a4f8ffd04e157d3591044cde8d7a56f605742c
Fix some undefined behaviour in the Curve448 code (2nd attempt)

Fixes #6800
Replaces #5418

This commit reverts commit 7876dbffcee9 and moves the check for a
zero-length input down the callstack into sha3_update().

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/6838)
crypto/ec/curve448/eddsa.c
crypto/evp/m_sha3.c