diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-12-18 19:44:10 +0100 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2020-01-03 11:34:37 +0100 |
commit | bc346caa581ff5bebd812498fa437e42b0ecf179 (patch) | |
tree | 4426be44d3c79959cc2ff5e4f3173b223e3a6e58 | |
parent | 420133abc5224febb1d9ebd9f22b6a544cca61e9 (diff) | |
download | gnutls-bc346caa581ff5bebd812498fa437e42b0ecf179.tar.gz |
Fix implicit value change in verify-high.c
verify-high.c:284:7: runtime error: implicit conversion from type 'size_t'
(aka 'unsigned long') of value 15421545260338 418178 (64-bit, unsigned) to
type 'uint32_t' (aka 'unsigned int') changed the value to 437555714 (32-bit,
unsigned)
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
-rw-r--r-- | lib/x509/verify-high.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c index 5515d54ff9..b1421ef17a 100644 --- a/lib/x509/verify-high.c +++ b/lib/x509/verify-high.c @@ -274,7 +274,7 @@ gnutls_x509_trust_list_add_cas(gnutls_x509_trust_list_t list, unsigned clist_size, unsigned int flags) { unsigned i, j; - uint32_t hash; + size_t hash; int ret; unsigned exists; @@ -565,7 +565,7 @@ gnutls_x509_trust_list_remove_cas(gnutls_x509_trust_list_t list, { int r = 0; unsigned j, i; - uint32_t hash; + size_t hash; for (i = 0; i < clist_size; i++) { hash = @@ -644,7 +644,7 @@ gnutls_x509_trust_list_add_named_crt(gnutls_x509_trust_list_t list, const void *name, size_t name_size, unsigned int flags) { - uint32_t hash; + size_t hash; if (name_size >= MAX_SERVER_NAME_SIZE) return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); @@ -712,7 +712,7 @@ gnutls_x509_trust_list_add_crls(gnutls_x509_trust_list_t list, int ret; unsigned x, i, j = 0; unsigned int vret = 0; - uint32_t hash; + size_t hash; gnutls_x509_crl_t *tmp; /* Probably we can optimize things such as removing duplicates @@ -806,7 +806,7 @@ static int shorten_clist(gnutls_x509_trust_list_t list, unsigned int clist_size) { unsigned int j, i; - uint32_t hash; + size_t hash; if (clist_size > 1) { /* Check if the last certificate in the path is self signed. @@ -859,7 +859,7 @@ int trust_list_get_issuer(gnutls_x509_trust_list_t list, { int ret; unsigned int i; - uint32_t hash; + size_t hash; hash = hash_pjw_bare(cert->raw_issuer_dn.data, @@ -893,7 +893,7 @@ int trust_list_get_issuer_by_dn(gnutls_x509_trust_list_t list, { int ret; unsigned int i, j; - uint32_t hash; + size_t hash; uint8_t tmp[256]; size_t tmp_size; @@ -1257,7 +1257,7 @@ gnutls_x509_trust_list_verify_crt2(gnutls_x509_trust_list_t list, { int ret; unsigned int i; - uint32_t hash; + size_t hash; gnutls_x509_crt_t sorted[DEFAULT_MAX_VERIFY_DEPTH]; const char *hostname = NULL, *purpose = NULL, *email = NULL; unsigned hostname_size = 0; @@ -1501,7 +1501,7 @@ gnutls_x509_trust_list_verify_named_crt(gnutls_x509_trust_list_t list, { int ret; unsigned int i; - uint32_t hash; + size_t hash; hash = @@ -1558,7 +1558,7 @@ _gnutls_trustlist_inlist(gnutls_x509_trust_list_t list, { int ret; unsigned int i; - uint32_t hash; + size_t hash; hash = hash_pjw_bare(cert->raw_dn.data, cert->raw_dn.size); hash %= list->size; |