mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
[CRYPTO] sha1: Fixed off-by-64 bug in sha1_update
After a partial update, the done pointer is off to the right by 64 bytes. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
afad2608c7
commit
bcb0ad2b34
1 changed files with 2 additions and 2 deletions
|
|
@ -61,8 +61,8 @@ static void sha1_update(void *ctx, const u8 *data, unsigned int len)
|
|||
u32 temp[SHA_WORKSPACE_WORDS];
|
||||
|
||||
if (partial) {
|
||||
done = 64 - partial;
|
||||
memcpy(sctx->buffer + partial, data, done);
|
||||
done = -partial;
|
||||
memcpy(sctx->buffer + partial, data, done + 64);
|
||||
src = sctx->buffer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue