Browse Source

Merge commit '2ff1610' into bfgminer

Luke Dashjr 13 years ago
parent
commit
734181ded0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      findnonce.c

+ 3 - 0
findnonce.c

@@ -150,6 +150,9 @@ static void *postcalc_hash(void *userdata)
 	pthread_detach(pthread_self());
 	rename_thr("bfg-postcalchsh");
 
+	/* To prevent corrupt values in FOUND from trying to read beyond the
+	 * end of the res[] array */
+	pcd->res[FOUND] &= FOUND;
 	for (entry = 0; entry < pcd->res[FOUND]; entry++) {
 		uint32_t nonce = pcd->res[entry];