Commit 687fed1de9126537dbe894dc2dddb52cdd3ae2e2

Con Kolivas 2012-10-05T19:03:28

Use a static array for work submission data instead of stack memory.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index 49f9c4f..f679856 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2758,8 +2758,8 @@ static void *submit_work_thread(void *userdata)
 	if (work->stratum) {
 		struct stratum_share *sshare = calloc(sizeof(struct stratum_share), 1);
 		uint32_t *hash32 = (uint32_t *)work->hash, nonce;
-		char *s = alloca(1024);
 		char *noncehex;
+		char s[1024];
 
 		memcpy(&sshare->work, work, sizeof(struct work));