diff --git a/util.c b/util.c index 9be17f6..3bdac5e 100644 --- a/util.c +++ b/util.c @@ -1088,6 +1088,10 @@ start: applog(LOG_ERR, "Failed to get extranonce2_size"); 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); free(sctx->session_id);