git: 33e176b8f929 - main - security/samhain: fix build on big-endian
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 28 Jan 2024 02:32:17 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=33e176b8f9291561a0317678effecb0e04e9a839
commit 33e176b8f9291561a0317678effecb0e04e9a839
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-01-27 15:16:28 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-01-28 02:32:08 +0000
security/samhain: fix build on big-endian
x_sh_checksum.c:471:15: error: incompatible pointer to integer conversion passing 'sha2_word32[8]' (aka 'unsigned int[8]') to parameter of type 'int' [-Wint-conversion]
memset(d, context->state, SHA256_DIGEST_LENGTH);
^~~~~~~~~~~~~~
---
security/samhain/files/patch-src_sh__checksum.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/security/samhain/files/patch-src_sh__checksum.c b/security/samhain/files/patch-src_sh__checksum.c
new file mode 100644
index 000000000000..2f6a603aeb24
--- /dev/null
+++ b/security/samhain/files/patch-src_sh__checksum.c
@@ -0,0 +1,11 @@
+--- src/sh_checksum.c.orig 2024-01-27 14:26:35 UTC
++++ src/sh_checksum.c
+@@ -468,7 +468,7 @@ void SHA256_Final(sha2_byte digest[], SHA256_CTX* cont
+ }
+ }
+ #else
+- memset(d, context->state, SHA256_DIGEST_LENGTH);
++ memcpy(d, context->state, SHA256_DIGEST_LENGTH);
+ /* bcopy(context->state, d, SHA256_DIGEST_LENGTH); */
+ #endif
+ }