diff options
| author | miod <> | 2015-07-19 18:29:31 +0000 |
|---|---|---|
| committer | miod <> | 2015-07-19 18:29:31 +0000 |
| commit | a24b14b6bf2c04501ea84182a52caa5bf2ae7635 (patch) | |
| tree | 7d71f138b5b5706a448942547e5154bd651f174c /src/lib/libcrypto/asn1 | |
| parent | 7fa3eebdfe6c452f7df52bcda90cfe95b4b1e6ce (diff) | |
| download | openbsd-a24b14b6bf2c04501ea84182a52caa5bf2ae7635.tar.gz openbsd-a24b14b6bf2c04501ea84182a52caa5bf2ae7635.tar.bz2 openbsd-a24b14b6bf2c04501ea84182a52caa5bf2ae7635.zip | |
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 'src/lib/libcrypto/asn1')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/a_int.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/a_sign.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index 473a945e09..5575a5c939 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_bitstr.c,v 1.20 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_bitstr.c,v 1.21 2015/07/19 18:29:31 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -155,7 +155,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
| 155 | 155 | ||
| 156 | if (len-- > 1) /* using one because of the bits left byte */ | 156 | if (len-- > 1) /* using one because of the bits left byte */ |
| 157 | { | 157 | { |
| 158 | s = malloc((int)len); | 158 | s = malloc(len); |
| 159 | if (s == NULL) { | 159 | if (s == NULL) { |
| 160 | i = ERR_R_MALLOC_FAILURE; | 160 | i = ERR_R_MALLOC_FAILURE; |
| 161 | goto err; | 161 | goto err; |
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c index af5d64d056..7d17aae2a2 100644 --- a/src/lib/libcrypto/asn1/a_int.c +++ b/src/lib/libcrypto/asn1/a_int.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_int.c,v 1.26 2015/03/19 14:00:22 tedu Exp $ */ | 1 | /* $OpenBSD: a_int.c,v 1.27 2015/07/19 18:29:31 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -310,7 +310,7 @@ d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length) | |||
| 310 | 310 | ||
| 311 | /* We must malloc stuff, even for 0 bytes otherwise it | 311 | /* We must malloc stuff, even for 0 bytes otherwise it |
| 312 | * signifies a missing NULL parameter. */ | 312 | * signifies a missing NULL parameter. */ |
| 313 | s = malloc((int)len + 1); | 313 | s = malloc(len + 1); |
| 314 | if (s == NULL) { | 314 | if (s == NULL) { |
| 315 | i = ERR_R_MALLOC_FAILURE; | 315 | i = ERR_R_MALLOC_FAILURE; |
| 316 | goto err; | 316 | goto err; |
diff --git a/src/lib/libcrypto/asn1/a_sign.c b/src/lib/libcrypto/asn1/a_sign.c index 83e7f44d12..d9385312a7 100644 --- a/src/lib/libcrypto/asn1/a_sign.c +++ b/src/lib/libcrypto/asn1/a_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_sign.c,v 1.19 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_sign.c,v 1.20 2015/07/19 18:29:31 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -203,7 +203,7 @@ ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, | |||
| 203 | 203 | ||
| 204 | inl = ASN1_item_i2d(asn, &buf_in, it); | 204 | inl = ASN1_item_i2d(asn, &buf_in, it); |
| 205 | outll = outl = EVP_PKEY_size(pkey); | 205 | outll = outl = EVP_PKEY_size(pkey); |
| 206 | buf_out = malloc((unsigned int)outl); | 206 | buf_out = malloc(outl); |
| 207 | if ((buf_in == NULL) || (buf_out == NULL)) { | 207 | if ((buf_in == NULL) || (buf_out == NULL)) { |
| 208 | outl = 0; | 208 | outl = 0; |
| 209 | ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_MALLOC_FAILURE); | 209 | 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, | |||
| 229 | err: | 229 | err: |
| 230 | EVP_MD_CTX_cleanup(ctx); | 230 | EVP_MD_CTX_cleanup(ctx); |
| 231 | if (buf_in != NULL) { | 231 | if (buf_in != NULL) { |
| 232 | OPENSSL_cleanse((char *)buf_in, (unsigned int)inl); | 232 | OPENSSL_cleanse((char *)buf_in, inl); |
| 233 | free(buf_in); | 233 | free(buf_in); |
| 234 | } | 234 | } |
| 235 | if (buf_out != NULL) { | 235 | if (buf_out != NULL) { |
