提交 9d20b571 编写于 作者: H Herbert Xu

crypto: sha-s390 - Reset index after processing partial block

The partial block handling in sha-s390 is broken when we get a
partial block that is followed by an update which fills it with
bytes left-over.  Instead of storing the newly left-over bytes
at the start of the buffer, it will be stored immediately after
the previous partial block.

This patch fixes this by resetting the index pointer.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 1bae4ce2
......@@ -38,6 +38,7 @@ int s390_sha_update(struct shash_desc *desc, const u8 *data, unsigned int len)
BUG_ON(ret != bsize);
data += bsize - index;
len -= bsize - index;
index = 0;
}
/* process as many blocks as possible */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册