aboutsummaryrefslogtreecommitdiff
path: root/crypto/x509
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2017-09-15 09:05:43 +1000
committerPauli <paul.dale@oracle.com>2017-09-15 09:05:43 +1000
commit53a73768a7f17dba012615ea79960d724b310856 (patch)
tree1fd952008aed5b480e97e8454741942e3f1285b3 /crypto/x509
parent44589b5d44217aacbceff08f8317c2a0a4e0ff40 (diff)
downloadopenssl-53a73768a7f17dba012615ea79960d724b310856.zip
openssl-53a73768a7f17dba012615ea79960d724b310856.tar.gz
openssl-53a73768a7f17dba012615ea79960d724b310856.tar.bz2
Avoid signed vs unsigned comparison error.
Introduced by #4372 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4374)
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/by_dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index 03492ac..b83a473 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -150,7 +150,8 @@ static void free_dir(X509_LOOKUP *lu)
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;
if (dir == NULL || !*dir) {
@@ -165,7 +166,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type)
BY_DIR_ENTRY *ent;
ss = s;
s = p + 1;
- len = (int)(p - ss);
+ len = p - ss;
if (len == 0)
continue;
for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {