mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Bugfix: initiate_stratum: Ensure extranonce2 size is not negative (which could lead to exploits later as too little memory gets allocated)
Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
This commit is contained in:
parent
f0e47ec8ec
commit
bac5831b35
3
util.c
3
util.c
@ -2505,7 +2505,8 @@ resend:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
n2size = json_integer_value(json_array_get(res_val, 2));
|
n2size = json_integer_value(json_array_get(res_val, 2));
|
||||||
if (!n2size) {
|
if (n2size < 1)
|
||||||
|
{
|
||||||
applog(LOG_INFO, "Failed to get n2size in initiate_stratum");
|
applog(LOG_INFO, "Failed to get n2size in initiate_stratum");
|
||||||
free(sessionid);
|
free(sessionid);
|
||||||
free(nonce1);
|
free(nonce1);
|
||||||
|
Loading…
Reference in New Issue
Block a user