From a24b14b6bf2c04501ea84182a52caa5bf2ae7635 Mon Sep 17 00:00:00 2001 From: miod <> Date: Sun, 19 Jul 2015 18:29:31 +0000 Subject: Drop stupid (int) casts for the arguments of malloc() and friends. This is not 16-bit MS-DOS anymore. ok bcook@ tedu@ --- src/lib/libcrypto/rsa/rsa_saos.c | 6 +++--- src/lib/libcrypto/rsa/rsa_sign.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/libcrypto/rsa') diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index adf459ee6d..3a07a7af4a 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_saos.c,v 1.16 2014/07/12 16:03:37 miod Exp $ */ +/* $OpenBSD: rsa_saos.c,v 1.17 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -84,7 +84,7 @@ RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY); return 0; } - s = malloc((unsigned int)j + 1); + s = malloc(j + 1); if (s == NULL) { RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); return 0; @@ -117,7 +117,7 @@ RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, return 0; } - s = malloc((unsigned int)siglen); + s = malloc(siglen); if (s == NULL) { RSAerr(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index 09d8ef329d..db63c5f038 100644 --- a/src/lib/libcrypto/rsa/rsa_sign.c +++ b/src/lib/libcrypto/rsa/rsa_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_sign.c,v 1.23 2015/06/20 01:07:25 doug Exp $ */ +/* $OpenBSD: rsa_sign.c,v 1.24 2015/07/19 18:29:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -121,7 +121,7 @@ RSA_sign(int type, const unsigned char *m, unsigned int m_len, return 0; } if (type != NID_md5_sha1) { - tmps = malloc((unsigned int)j + 1); + tmps = malloc(j + 1); if (tmps == NULL) { RSAerr(RSA_F_RSA_SIGN, ERR_R_MALLOC_FAILURE); return 0; @@ -166,7 +166,7 @@ int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len, return 1; } - s = malloc((unsigned int)siglen); + s = malloc(siglen); if (s == NULL) { RSAerr(RSA_F_INT_RSA_VERIFY, ERR_R_MALLOC_FAILURE); goto err; -- cgit v1.2.3-55-g6feb