projects
/
platform
/
upstream
/
cryptsetup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5244bc
)
Fix gcrypt final() function backend call.
author
Milan Broz
<gmazyland@gmail.com>
Mon, 25 Jul 2011 21:15:41 +0000
(21:15 +0000)
committer
Milan Broz
<gmazyland@gmail.com>
Mon, 25 Jul 2011 21:15:41 +0000
(21:15 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@580
36d66b0a
-2a48-0410-832c-
cd162a569da5
lib/crypto_backend/crypto_gcrypt.c
patch
|
blob
|
history
diff --git
a/lib/crypto_backend/crypto_gcrypt.c
b/lib/crypto_backend/crypto_gcrypt.c
index
2c9e72d
..
072faeb
100644
(file)
--- a/
lib/crypto_backend/crypto_gcrypt.c
+++ b/
lib/crypto_backend/crypto_gcrypt.c
@@
-139,9
+139,9
@@
int crypt_hash_final(struct crypt_hash *ctx, char *buffer, size_t length)
if (!hash)
return -EINVAL;
+ memcpy(buffer, hash, length);
crypt_hash_restart(ctx);
- memcpy(buffer, hash, length);
return 0;
}
@@
-214,9
+214,9
@@
int crypt_hmac_final(struct crypt_hmac *ctx, char *buffer, size_t length)
if (!hash)
return -EINVAL;
+ memcpy(buffer, hash, length);
crypt_hmac_restart(ctx);
- memcpy(buffer, hash, length);
return 0;
}