aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2010-12-06 00:57:48 -0500
committerJeff Garzik <jgarzik@redhat.com>2010-12-06 00:57:48 -0500
commit6b5fb469cc04f81249cff4db604738c80a6a2590 (patch)
tree0c2cc85fa7f3366dcbe615ce411c43b3e67a7312
parent276dcdbcec044b44835eacd16982badce3ad4d87 (diff)
sha256_via: align tmp_hash1 to 128, to avoid stack clobber
Reported by lfm
-rw-r--r--sha256_via.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha256_via.c b/sha256_via.c
index d9abc88..45e6821 100644
--- a/sha256_via.c
+++ b/sha256_via.c
@@ -33,7 +33,7 @@ bool scanhash_via(const unsigned char *midstate, const unsigned char *data_in,
unsigned long *hashes_done)
{
unsigned char data[128] __attribute__((aligned(128)));
- unsigned char tmp_hash1[32] __attribute__((aligned(32)));
+ unsigned char tmp_hash1[32] __attribute__((aligned(128)));
uint32_t *hash32 = (uint32_t *) hash;
uint32_t *nonce = (uint32_t *)(data + 12);
uint32_t n = 0;