projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afad260
)
[CRYPTO] sha1: Fixed off-by-64 bug in sha1_update
author
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 21 Dec 2005 11:01:58 +0000
(19:01 +0800)
committer
David S. Miller
<davem@sunset.davemloft.net>
Mon, 9 Jan 2006 22:15:56 +0000
(14:15 -0800)
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>
crypto/sha1.c
patch
|
blob
|
blame
|
history
diff --git
a/crypto/sha1.c
b/crypto/sha1.c
index 8048e2dd3c14e3343a7efc78985e787c70466bca..21571ed35b7ee7f90792a5f8b83ea2b42ff6cac6 100644
(file)
--- a/
crypto/sha1.c
+++ b/
crypto/sha1.c
@@
-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;
}