Directly return from final sha3/keccak_final if no bytes are requested
authorPatrick Steuer <patrick.steuer@de.ibm.com>
Mon, 5 Aug 2019 14:53:16 +0000 (16:53 +0200)
committerPatrick Steuer <patrick.steuer@de.ibm.com>
Sun, 18 Aug 2019 19:33:49 +0000 (21:33 +0200)
commit6087d4a6fb1877c668dcf934da6a2f9e402dff1d
treeb8c7212c2ced188f347dd0de8a58c578f4f10fe3
parentec9cbe21519f85e65e2f128d3f04bfd904642079
Directly return from final sha3/keccak_final if no bytes are requested

Requesting zero bytes from shake previously led to out-of-bounds write
on some platforms.

Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9433)

(cherry picked from commit a890ef833d114da3430c2f2efd95e01714704d34)
crypto/evp/m_sha3.c