From fcd1162865bf2b098c2e7a7a020f618665622860 Mon Sep 17 00:00:00 2001 From: pooler Date: Sat, 15 Jun 2013 14:05:39 +0200 Subject: [PATCH] Avoid passing NULL to strcmp() in stratum_thread() --- cpu-miner.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu-miner.c b/cpu-miner.c index 5915d9a..ae28cf7 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -960,7 +960,8 @@ static void *stratum_thread(void *userdata) } } - if (strcmp(stratum.job.job_id, g_work.job_id) || !g_work_time) { + if (stratum.job.job_id && + (strcmp(stratum.job.job_id, g_work.job_id) || !g_work_time)) { pthread_mutex_lock(&g_work_lock); stratum_gen_work(&stratum, &g_work); time(&g_work_time);