crypto: digest: fix digesting file windows
When digesting a file we always try toread PAGE_SIZE bytes. When we get a
short read because we reached the file end then the code works
correctly. If instead we only want to digest a part of the file then
we must make sure to only read up to 'size' bytes.

Fixes: b77582effd ("crypto: digest: Split memory vs. file code into separate functions")

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 41cfc40 commit b933013b65df63a6607253d1162c770c835c5e59
@Sascha Hauer Sascha Hauer authored on 8 May 2019
Showing 1 changed file
View
crypto/digest.c