Handle empty log name in "enable_logs" line of the CT log file
e.g. "enabled_logs = foo,,bar" Reviewed-by: Ben Laurie <ben@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
0c6ea56568
commit
2508c047eb
1 changed files with 6 additions and 1 deletions
|
@ -213,8 +213,13 @@ static int ctlog_store_load_log(const char *log_name, int log_name_len,
|
|||
CTLOG_STORE_LOAD_CTX *load_ctx = arg;
|
||||
CTLOG *ct_log;
|
||||
/* log_name may not be null-terminated, so fix that before using it */
|
||||
char *tmp = OPENSSL_strndup(log_name, log_name_len);
|
||||
char *tmp;
|
||||
|
||||
/* log_name will be NULL for empty list entries */
|
||||
if (log_name == NULL)
|
||||
return 1;
|
||||
|
||||
tmp = OPENSSL_strndup(log_name, log_name_len);
|
||||
ct_log = ctlog_new_from_conf(load_ctx->conf, tmp);
|
||||
OPENSSL_free(tmp);
|
||||
if (ct_log == NULL) {
|
||||
|
|
Loading…
Reference in a new issue