mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 12:34:27 +00:00
Prevent corrupt values returned from the opencl code from trying to read beyond the end of the buffer by masking the value to a max of 15.
This commit is contained in:
parent
0097757dc3
commit
2ff1610307
@ -252,6 +252,9 @@ static void *postcalc_hash(void *userdata)
|
|||||||
|
|
||||||
pthread_detach(pthread_self());
|
pthread_detach(pthread_self());
|
||||||
|
|
||||||
|
/* 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++) {
|
for (entry = 0; entry < pcd->res[FOUND]; entry++) {
|
||||||
uint32_t nonce = pcd->res[entry];
|
uint32_t nonce = pcd->res[entry];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user