From 6b5fb469cc04f81249cff4db604738c80a6a2590 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 6 Dec 2010 00:57:48 -0500 Subject: [PATCH] sha256_via: align tmp_hash1 to 128, to avoid stack clobber Reported by lfm --- sha256_via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha256_via.c b/sha256_via.c index d9abc884..45e68211 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;