From c9077b6ac85820209d82f7f8c73bb757df3089df Mon Sep 17 00:00:00 2001 From: jbleyel Date: Thu, 22 Jun 2023 00:15:33 +0200 Subject: [PATCH] [dvbci_ccmgr_helper] * Replace call to the non reentrant function "localtime" by a call to "localtime_r". --- lib/dvb_ci/dvbci_ccmgr_helper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dvb_ci/dvbci_ccmgr_helper.cpp b/lib/dvb_ci/dvbci_ccmgr_helper.cpp index 6e527f95401..80928975fa5 100644 --- a/lib/dvb_ci/dvbci_ccmgr_helper.cpp +++ b/lib/dvb_ci/dvbci_ccmgr_helper.cpp @@ -341,8 +341,9 @@ int verify_cb(int ok, X509_STORE_CTX *ctx) if (X509_STORE_CTX_get_error(ctx) == X509_V_ERR_CERT_NOT_YET_VALID) { time_t now = time(NULL); - struct tm *t = localtime(&now); - if (t->tm_year < 2015) + struct tm t; + localtime_r(&now, &t); + if (t.tm_year < 2023) { eDebug("[CI RCC] seems our system clock is wrong - ignore!"); return 1;