NULL dereference.

pull/2773/head
Stanislav Klima 2020-01-29 17:33:38 +01:00
parent c3fabb1da6
commit 2d36624d84
1 changed files with 3 additions and 0 deletions

View File

@ -24901,6 +24901,9 @@ int wolfSSL_X509_cmp_time(const WOLFSSL_ASN1_TIME* asnTime, time_t* cmpTime)
/* Convert to time struct*/
ct = XGMTIME(pTime, tmpTs);
if (ct == NULL)
return GETTIME_ERROR;
/* DateGreaterThan returns 1 for >; 0 for <= */
ret = DateGreaterThan(&ts, ct) ? 1 : -1;
}