Skip to content

Commit

Permalink
[dvbci_ccmgr_helper]
Browse files Browse the repository at this point in the history
* Replace call to the non reentrant function "localtime" by a call to "localtime_r".
  • Loading branch information
jbleyel committed Jun 21, 2023
1 parent cff0ca8 commit c9077b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/dvb_ci/dvbci_ccmgr_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c9077b6

Please sign in to comment.