summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-04-12 13:58:14 +1000
committerShane Lontis <shane.lontis@oracle.com>2021-04-16 12:10:08 +1000
commit42e7d2f10e3658c0c248df8a6edf3c48c477e4b0 (patch)
tree1122340c23e67327e2673fd516c5be2dc666e228 /apps
parent34ed73339602c361d09fe4233d65cef996356239 (diff)
Add more negative checks for integers passed to OPENSSL_malloc().
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14830)
Diffstat (limited to 'apps')
-rw-r--r--apps/lib/app_x509.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/lib/app_x509.c b/apps/lib/app_x509.c
index 00581aabbd..3d9e4fd697 100644
--- a/apps/lib/app_x509.c
+++ b/apps/lib/app_x509.c
@@ -26,7 +26,7 @@ static ASN1_OCTET_STRING *mk_octet_string(void *value, size_t value_n)
if (v == NULL) {
BIO_printf(bio_err, "error: allocation failed\n");
- } else if (!ASN1_OCTET_STRING_set(v, value, value_n)) {
+ } else if (!ASN1_OCTET_STRING_set(v, value, (int)value_n)) {
ASN1_OCTET_STRING_free(v);
v = NULL;
}