mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Check for invalid json result in work_decode.
This commit is contained in:
parent
56b16953a9
commit
432b2636d5
@ -1387,6 +1387,11 @@ static bool work_decode(struct pool *pool, struct work *work, json_t *val)
|
|||||||
json_t *res_val = json_object_get(val, "result");
|
json_t *res_val = json_object_get(val, "result");
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
|
if (!res_val || json_is_null(res_val)) {
|
||||||
|
applog(LOG_ERR, "JSON Failed to decode result");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (pool->has_gbt) {
|
if (pool->has_gbt) {
|
||||||
work->gbt = true;
|
work->gbt = true;
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user