lentferj's projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
5ba3877
)
cryptsetup - fix hash() frontend function
author
Alex Hornung <ahornung@gmail.com>
Thu, 9 Sep 2010 18:57:33 +0000 (19:57 +0100)
committer
Alex Hornung <ahornung@gmail.com>
Thu, 9 Sep 2010 18:59:46 +0000 (19:59 +0100)
* hash() in backends.c would always return ENOENT, because the return
variable r wasn't being updated.
* luks wasn't affected by this as it uses a different path, but using
cryptsetup without luks would trigger this.
Reported-by: Matthias Schmidt (matthias@)
contrib/cryptsetup/lib/backends.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/cryptsetup/lib/backends.c
b/contrib/cryptsetup/lib/backends.c
index
446e812
..
488ccef
100644
(file)
--- a/
contrib/cryptsetup/lib/backends.c
+++ b/
contrib/cryptsetup/lib/backends.c
@@
-37,7
+37,7
@@
int hash(const char *backend_name, const char *hash_name,
EVP_DigestInit(&mdctx, md);
EVP_DigestUpdate(&mdctx, passphrase, sizep);
- EVP_DigestFinal(&mdctx, result, NULL);
+ r = !EVP_DigestFinal(&mdctx, result, NULL);
if (pad) {
memset(result+size, 0, pad);