diff --git a/src/manage_migrators.c b/src/manage_migrators.c index 7630de396..5fd0bf6b2 100644 --- a/src/manage_migrators.c +++ b/src/manage_migrators.c @@ -1031,11 +1031,16 @@ migrate_213_to_214 () " LIMIT 1;", quoted_scanner_fpr); - parse_ssldetails (ssldetails, - &activation_time, - &expiration_time, - &issuer, - &serial); + if (ssldetails) + parse_ssldetails (ssldetails, + &activation_time, + &expiration_time, + &issuer, + &serial); + else + g_warning ("%s: No SSLDetails found for fingerprint %s", + __FUNCTION__, + scanner_fpr); free (ssldetails); } diff --git a/src/manage_sql_tls_certificates.c b/src/manage_sql_tls_certificates.c index 3dca5aea0..5bce19a36 100644 --- a/src/manage_sql_tls_certificates.c +++ b/src/manage_sql_tls_certificates.c @@ -1459,11 +1459,16 @@ add_tls_certificates_from_report_host (report_host_t report_host, report_host, quoted_scanner_fpr); - parse_ssldetails (ssldetails, - &activation_time, - &expiration_time, - &issuer, - &serial); + if (ssldetails) + parse_ssldetails (ssldetails, + &activation_time, + &expiration_time, + &issuer, + &serial); + else + g_warning ("%s: No SSLDetails found for fingerprint %s", + __FUNCTION__, + scanner_fpr); free (ssldetails); diff --git a/src/manage_tls_certificates.c b/src/manage_tls_certificates.c index d2c0624b0..079e22c27 100644 --- a/src/manage_tls_certificates.c +++ b/src/manage_tls_certificates.c @@ -56,6 +56,12 @@ parse_ssldetails (const char *ssldetails, { gchar **ssldetails_split, **ssldetails_point; + if (ssldetails == NULL) + { + g_warning ("%s: ssldetails is NULL", __FUNCTION__); + return; + } + ssldetails_split = g_strsplit (ssldetails, "|", -1); ssldetails_point = ssldetails_split; while (*ssldetails_point)