Check for negative extranonce2_size
This commit is contained in:
parent
be1b725270
commit
9681504048
1 changed files with 4 additions and 0 deletions
4
util.c
4
util.c
|
@ -1088,6 +1088,10 @@ start:
|
||||||
applog(LOG_ERR, "Failed to get extranonce2_size");
|
applog(LOG_ERR, "Failed to get extranonce2_size");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (xn2_size < 0 || xn2_size > 100) {
|
||||||
|
applog(LOG_ERR, "Invalid value of extranonce2_size");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
pthread_mutex_lock(&sctx->work_lock);
|
pthread_mutex_lock(&sctx->work_lock);
|
||||||
free(sctx->session_id);
|
free(sctx->session_id);
|
||||||
|
|
Loading…
Reference in a new issue