Skip to content

Commit

Permalink
security/samhain: fix build on big-endian
Browse files Browse the repository at this point in the history
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);
              ^~~~~~~~~~~~~~
  • Loading branch information
pkubaj committed Jan 28, 2024
1 parent b5724fc commit 33e176b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 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
}

0 comments on commit 33e176b

Please sign in to comment.