提交 53a73768 编写于 作者: P Pauli

Avoid signed vs unsigned comparison error.

Introduced by #4372
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4374)
上级 44589b5d
...@@ -150,7 +150,8 @@ static void free_dir(X509_LOOKUP *lu) ...@@ -150,7 +150,8 @@ static void free_dir(X509_LOOKUP *lu)
static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) static int add_cert_dir(BY_DIR *ctx, const char *dir, int type)
{ {
int j, len; int j;
size_t len;
const char *s, *ss, *p; const char *s, *ss, *p;
if (dir == NULL || !*dir) { if (dir == NULL || !*dir) {
...@@ -165,7 +166,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type) ...@@ -165,7 +166,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type)
BY_DIR_ENTRY *ent; BY_DIR_ENTRY *ent;
ss = s; ss = s;
s = p + 1; s = p + 1;
len = (int)(p - ss); len = p - ss;
if (len == 0) if (len == 0)
continue; continue;
for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) { for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册