summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_int.c
diff options
context:
space:
mode:
authortedu <>2014-07-10 11:25:13 +0000
committertedu <>2014-07-10 11:25:13 +0000
commit9d3143ff6ad17d4edec6f49bea7bcdf7794f64a5 (patch)
tree7e6c9ca704304f6f99e87e8dac39a6d87504a1c5 /src/lib/libcrypto/asn1/a_int.c
parent61a4bd4a18867aecea2b5f0da267ba17f1f102ea (diff)
downloadopenbsd-9d3143ff6ad17d4edec6f49bea7bcdf7794f64a5.tar.gz
openbsd-9d3143ff6ad17d4edec6f49bea7bcdf7794f64a5.tar.bz2
openbsd-9d3143ff6ad17d4edec6f49bea7bcdf7794f64a5.zip
delete some casts. ok miod
Diffstat (limited to 'src/lib/libcrypto/asn1/a_int.c')
-rw-r--r--src/lib/libcrypto/asn1/a_int.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c
index 09df551065..015d02ccdb 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.21 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: a_int.c,v 1.22 2014/07/10 11:25:13 tedu 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 *
@@ -159,7 +159,7 @@ i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
159 if (a->length == 0) 159 if (a->length == 0)
160 *(p++) = 0; 160 *(p++) = 0;
161 else if (!neg) 161 else if (!neg)
162 memcpy(p, a->data, (unsigned int)a->length); 162 memcpy(p, a->data, a->length);
163 else { 163 else {
164 /* Begin at the end of the encoding */ 164 /* Begin at the end of the encoding */
165 n = a->data + a->length - 1; 165 n = a->data + a->length - 1;
@@ -205,7 +205,7 @@ c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp, long len)
205 205
206 /* We must malloc stuff, even for 0 bytes otherwise it 206 /* We must malloc stuff, even for 0 bytes otherwise it
207 * signifies a missing NULL parameter. */ 207 * signifies a missing NULL parameter. */
208 s = malloc((int)len + 1); 208 s = malloc(len + 1);
209 if (s == NULL) { 209 if (s == NULL) {
210 i = ERR_R_MALLOC_FAILURE; 210 i = ERR_R_MALLOC_FAILURE;
211 goto err; 211 goto err;
@@ -253,7 +253,7 @@ c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp, long len)
253 p++; 253 p++;
254 len--; 254 len--;
255 } 255 }
256 memcpy(s, p, (int)len); 256 memcpy(s, p, len);
257 } 257 }
258 258
259 free(ret->data); 259 free(ret->data);
@@ -319,7 +319,7 @@ d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length)
319 p++; 319 p++;
320 len--; 320 len--;
321 } 321 }
322 memcpy(s, p, (int)len); 322 memcpy(s, p, len);
323 p += len; 323 p += len;
324 } 324 }
325 325