]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: algif_hash - Handle NULL hashes correctly
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 1 Sep 2016 09:16:44 +0000 (17:16 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 22 Aug 2017 15:43:01 +0000 (08:43 -0700)
commit8050a9109bf15496c4708906c27d16a175a1eaf9
treeeaf882f647c4af1553e8741e0a755f12e5fefa09
parent22daeb9d69a506b6cd8bed0e23c36f53b6999dae
crypto: algif_hash - Handle NULL hashes correctly

Right now attempting to read an empty hash simply returns zeroed
bytes, this patch corrects this by calling the digest function
using an empty input.

Reported-by: Russell King - ARM Linux <linux@armlinux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 493b2ed3f7603a15ff738553384d5a4510ffeb95)

Orabug: 25698521

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
crypto/algif_hash.c