crypto: omap-sham - huge buffer access fixes
authorTero Kristo <t-kristo@ti.com>
Wed, 27 May 2020 12:24:26 +0000 (15:24 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2020 12:03:41 +0000 (22:03 +1000)
commit6395166d7a19019d5e9574eb9ecdaf0028abb887
tree69cfb4122752292738b32d76ec349b417937805a
parent7e34e0bbc6449458a8de675814ffa22dec003698
crypto: omap-sham - huge buffer access fixes

The ctx internal buffer can only hold buflen amount of data, don't try
to copy over more than that. Also, initialize the context sg pointer
if we only have data in the context internal buffer, this can happen
when closing a hash with certain data amounts.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-sham.c