Check for negative extranonce2_size

This commit is contained in:
pooler 2014-08-08 14:49:07 +02:00
parent be1b725270
commit 9681504048

4
util.c
View file

@ -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);