summaryrefslogtreecommitdiffstats
path: root/recipes-security/samhain/files/samhain-sha256-big-endian.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/samhain/files/samhain-sha256-big-endian.patch')
-rw-r--r--recipes-security/samhain/files/samhain-sha256-big-endian.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/recipes-security/samhain/files/samhain-sha256-big-endian.patch b/recipes-security/samhain/files/samhain-sha256-big-endian.patch
new file mode 100644
index 0000000..3065c73
--- /dev/null
+++ b/recipes-security/samhain/files/samhain-sha256-big-endian.patch
@@ -0,0 +1,22 @@
1samhain: fix sha256 for big-endian machines
2
3After computing the digest, big-endian machines would
4memset() the digest to the first byte of state instead
5of using memcpy() to transfer it.
6
7Upstream-Status: Pending
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11
12--- a/src/sh_checksum.c
13+++ b/src/sh_checksum.c
14@@ -468,7 +468,7 @@ void SHA256_Final(sha2_byte digest[], SH
15 }
16 }
17 #else
18- memset(d, context->state, SHA256_DIGEST_LENGTH);
19+ memcpy(d, context->state, SHA256_DIGEST_LENGTH);
20 /* bcopy(context->state, d, SHA256_DIGEST_LENGTH); */
21 #endif
22 }