summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_bytes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bytes.c')
-rw-r--r--src/lib/libcrypto/asn1/a_bytes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/a_bytes.c b/src/lib/libcrypto/asn1/a_bytes.c
index 61910be5fe..abe6030750 100644
--- a/src/lib/libcrypto/asn1/a_bytes.c
+++ b/src/lib/libcrypto/asn1/a_bytes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_bytes.c,v 1.15 2014/07/09 22:55:17 tedu Exp $ */ 1/* $OpenBSD: a_bytes.c,v 1.16 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 *
@@ -99,12 +99,12 @@ d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
99 ret = (*a); 99 ret = (*a);
100 100
101 if (len != 0) { 101 if (len != 0) {
102 s = malloc((int)len + 1); 102 s = malloc(len + 1);
103 if (s == NULL) { 103 if (s == NULL) {
104 i = ERR_R_MALLOC_FAILURE; 104 i = ERR_R_MALLOC_FAILURE;
105 goto err; 105 goto err;
106 } 106 }
107 memcpy(s, p, (int)len); 107 memcpy(s, p, len);
108 s[len]='\0'; 108 s[len]='\0';
109 p += len; 109 p += len;
110 } else 110 } else
@@ -211,7 +211,7 @@ d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
211 } 211 }
212 } else 212 } else
213 s = ret->data; 213 s = ret->data;
214 memcpy(s, p, (int)len); 214 memcpy(s, p, len);
215 s[len] = '\0'; 215 s[len] = '\0';
216 p += len; 216 p += len;
217 } else { 217 } else {