Files
meta-security/recipes-ids/samhain/files/samhain-sha256-big-endian.patch
Armin Kuster 1460d9b86d reorg ids: move ids recipes to recipes-ids
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-03-31 10:37:09 -07:00

23 lines
579 B
Diff

samhain: fix sha256 for big-endian machines
After computing the digest, big-endian machines would
memset() the digest to the first byte of state instead
of using memcpy() to transfer it.
Upstream-Status: Pending
Signed-off-by: Joe Slater <jslater@windriver.com>
--- a/src/sh_checksum.c
+++ b/src/sh_checksum.c
@@ -468,7 +468,7 @@ void SHA256_Final(sha2_byte digest[], SH
}
}
#else
- memset(d, context->state, SHA256_DIGEST_LENGTH);
+ memcpy(d, context->state, SHA256_DIGEST_LENGTH);
/* bcopy(context->state, d, SHA256_DIGEST_LENGTH); */
#endif
}