1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-02 10:04:33 +00:00

Clear the buffer data before sprinting to it.

This commit is contained in:
Con Kolivas 2012-10-05 19:02:10 +10:00
parent f0901e0a26
commit c4aa8d267c

View File

@ -2772,6 +2772,7 @@ static void *submit_work_thread(void *userdata)
nonce = *((uint32_t *)(work->data + 76));
noncehex = bin2hex((const unsigned char *)&nonce, 4);
memset(s, 0, 1024);
sprintf(s, "{\"params\": [\"%s\", \"%s\", \"%s\", \"%s\", \"%s\"], \"id\": %d, \"method\": \"mining.submit\"}",
pool->rpc_user, work->job_id, work->nonce2, work->ntime, noncehex, sshare->id);
free(noncehex);