diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-07-19 18:29:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-07-19 18:29:32 +0000 |
commit | 00046c4ded0ae8d60f871fb2c05cf76208648133 (patch) | |
tree | 8414b97f8b37630fb7da76d242b28cc62fb81c6d /lib/libcrypto/asn1 | |
parent | 96a95160b43b7f62e8ded196888638ea008238cf (diff) |
Drop stupid (int) casts for the arguments of malloc() and friends. This is
not 16-bit MS-DOS anymore.
ok bcook@ tedu@
Diffstat (limited to 'lib/libcrypto/asn1')
-rw-r--r-- | lib/libcrypto/asn1/a_bitstr.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/asn1/a_int.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/asn1/a_sign.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/libcrypto/asn1/a_bitstr.c b/lib/libcrypto/asn1/a_bitstr.c index 473a945e099..5575a5c9394 100644 --- a/lib/libcrypto/asn1/a_bitstr.c +++ b/lib/libcrypto/asn1/a_bitstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_bitstr.c,v 1.20 2014/07/11 08:44:47 jsing Exp $ */ +/* $OpenBSD: a_bitstr.c,v 1.21 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -155,7 +155,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) if (len-- > 1) /* using one because of the bits left byte */ { - s = malloc((int)len); + s = malloc(len); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; diff --git a/lib/libcrypto/asn1/a_int.c b/lib/libcrypto/asn1/a_int.c index af5d64d0568..7d17aae2a2d 100644 --- a/lib/libcrypto/asn1/a_int.c +++ b/lib/libcrypto/asn1/a_int.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_int.c,v 1.26 2015/03/19 14:00:22 tedu Exp $ */ +/* $OpenBSD: a_int.c,v 1.27 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -310,7 +310,7 @@ d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length) /* We must malloc stuff, even for 0 bytes otherwise it * signifies a missing NULL parameter. */ - s = malloc((int)len + 1); + s = malloc(len + 1); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; diff --git a/lib/libcrypto/asn1/a_sign.c b/lib/libcrypto/asn1/a_sign.c index 83e7f44d127..d9385312a7d 100644 --- a/lib/libcrypto/asn1/a_sign.c +++ b/lib/libcrypto/asn1/a_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_sign.c,v 1.19 2014/07/11 08:44:47 jsing Exp $ */ +/* $OpenBSD: a_sign.c,v 1.20 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -203,7 +203,7 @@ ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, inl = ASN1_item_i2d(asn, &buf_in, it); outll = outl = EVP_PKEY_size(pkey); - buf_out = malloc((unsigned int)outl); + buf_out = malloc(outl); if ((buf_in == NULL) || (buf_out == NULL)) { outl = 0; ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_MALLOC_FAILURE); @@ -229,7 +229,7 @@ ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, err: EVP_MD_CTX_cleanup(ctx); if (buf_in != NULL) { - OPENSSL_cleanse((char *)buf_in, (unsigned int)inl); + OPENSSL_cleanse((char *)buf_in, inl); free(buf_in); } if (buf_out != NULL) { |