aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto/ex_data.c6
-rw-r--r--crypto/property/property.c2
-rw-r--r--crypto/x509/v3_addr.c2
-rw-r--r--crypto/x509/x509_vfy.c2
-rw-r--r--crypto/x509/x_name.c2
-rw-r--r--ssl/ssl_ciph.c2
-rw-r--r--test/stack_test.c4
7 files changed, 12 insertions, 8 deletions
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index cc9ebc3..c1467a5 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -445,7 +445,11 @@ int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val)
return 0;
}
}
- sk_void_set(ad->sk, idx, val);
+ if (sk_void_set(ad->sk, idx, val) != val) {
+ /* Probably the index is out of bounds */
+ CRYPTOerr(CRYPTO_F_CRYPTO_SET_EX_DATA, ERR_R_PASSED_INVALID_ARGUMENT);
+ return 0;
+ }
return 1;
}
diff --git a/crypto/property/property.c b/crypto/property/property.c
index 608a909..c2238ac 100644
--- a/crypto/property/property.c
+++ b/crypto/property/property.c
@@ -316,7 +316,7 @@ int ossl_method_store_remove(OSSL_METHOD_STORE *store, int nid,
if (impl->method.method == method) {
impl_free(impl);
- sk_IMPLEMENTATION_delete(alg->impls, i);
+ (void)sk_IMPLEMENTATION_delete(alg->impls, i);
ossl_property_unlock(store);
return 1;
}
diff --git a/crypto/x509/v3_addr.c b/crypto/x509/v3_addr.c
index 64127cf..7d4e99b 100644
--- a/crypto/x509/v3_addr.c
+++ b/crypto/x509/v3_addr.c
@@ -1257,7 +1257,7 @@ static int addr_validate_path_internal(X509_STORE_CTX *ctx,
|| addr_contains(fp->ipAddressChoice->u.addressesOrRanges,
fc->ipAddressChoice->u.addressesOrRanges,
length_from_afi(X509v3_addr_get_afi(fc))))
- sk_IPAddressFamily_set(child, j, fp);
+ (void)sk_IPAddressFamily_set(child, j, fp);
else
validation_err(X509_V_ERR_UNNESTED_RESOURCE);
}
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index d4a085d..5520f08 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -1683,7 +1683,7 @@ static int check_policy(X509_STORE_CTX *ctx)
ret = X509_policy_check(&ctx->tree, &ctx->explicit_policy, ctx->chain,
ctx->param->policies, ctx->param->flags);
if (ctx->bare_ta_signed)
- sk_X509_pop(ctx->chain);
+ (void)sk_X509_pop(ctx->chain);
if (ret == X509_PCY_TREE_INTERNAL) {
X509err(X509_F_CHECK_POLICY, ERR_R_MALLOC_FAILURE);
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c
index 692bd65..a85b10f 100644
--- a/crypto/x509/x_name.c
+++ b/crypto/x509/x_name.c
@@ -186,7 +186,7 @@ static int x509_name_ex_d2i(ASN1_VALUE **val,
entry->set = i;
if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry))
goto err;
- sk_X509_NAME_ENTRY_set(entries, j, NULL);
+ (void)sk_X509_NAME_ENTRY_set(entries, j, NULL);
}
}
ret = x509_name_canon(nm.x);
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 05add36..b8d22a7 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -1379,7 +1379,7 @@ static int update_cipher_list(STACK_OF(SSL_CIPHER) **cipher_list,
while (sk_SSL_CIPHER_num(tmp_cipher_list) > 0
&& sk_SSL_CIPHER_value(tmp_cipher_list, 0)->min_tls
== TLS1_3_VERSION)
- sk_SSL_CIPHER_delete(tmp_cipher_list, 0);
+ (void)sk_SSL_CIPHER_delete(tmp_cipher_list, 0);
/* Insert the new TLSv1.3 ciphersuites */
for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++)
diff --git a/test/stack_test.c b/test/stack_test.c
index 1f4cb1c..3aa0b08 100644
--- a/test/stack_test.c
+++ b/test/stack_test.c
@@ -131,7 +131,7 @@ static int test_int_stack(int reserve)
/* sorting */
if (!TEST_false(sk_sint_is_sorted(s)))
goto end;
- sk_sint_set_cmp_func(s, &int_compare);
+ (void)sk_sint_set_cmp_func(s, &int_compare);
sk_sint_sort(s);
if (!TEST_true(sk_sint_is_sorted(s)))
goto end;
@@ -237,7 +237,7 @@ static int test_uchar_stack(int reserve)
goto end;
/* set */
- sk_uchar_set(r, 1, v + 1);
+ (void)sk_uchar_set(r, 1, v + 1);
for (i = 0; i < 2; i++)
if (!TEST_ptr_eq(sk_uchar_value(r, i), v + i)) {
TEST_info("uchar set %d", i);