提交 2508c047 编写于 作者: R Rob Percival 提交者: Rich Salz

Handle empty log name in "enable_logs" line of the CT log file

e.g. "enabled_logs = foo,,bar"
Reviewed-by: NBen Laurie <ben@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 0c6ea565
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册