diff options
author | beck <> | 2000-12-15 02:58:47 +0000 |
---|---|---|
committer | beck <> | 2000-12-15 02:58:47 +0000 |
commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/asn1/a_bytes.c | |
parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bytes.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bytes.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/a_bytes.c b/src/lib/libcrypto/asn1/a_bytes.c index 8cde695804..3a0c0c7835 100644 --- a/src/lib/libcrypto/asn1/a_bytes.c +++ b/src/lib/libcrypto/asn1/a_bytes.c | |||
@@ -111,7 +111,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp, | |||
111 | 111 | ||
112 | if (len != 0) | 112 | if (len != 0) |
113 | { | 113 | { |
114 | s=(unsigned char *)Malloc((int)len+1); | 114 | s=(unsigned char *)OPENSSL_malloc((int)len+1); |
115 | if (s == NULL) | 115 | if (s == NULL) |
116 | { | 116 | { |
117 | i=ERR_R_MALLOC_FAILURE; | 117 | i=ERR_R_MALLOC_FAILURE; |
@@ -124,7 +124,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp, | |||
124 | else | 124 | else |
125 | s=NULL; | 125 | s=NULL; |
126 | 126 | ||
127 | if (ret->data != NULL) Free(ret->data); | 127 | if (ret->data != NULL) OPENSSL_free(ret->data); |
128 | ret->length=(int)len; | 128 | ret->length=(int)len; |
129 | ret->data=s; | 129 | ret->data=s; |
130 | ret->type=tag; | 130 | ret->type=tag; |
@@ -218,8 +218,8 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length, | |||
218 | { | 218 | { |
219 | if ((ret->length < len) || (ret->data == NULL)) | 219 | if ((ret->length < len) || (ret->data == NULL)) |
220 | { | 220 | { |
221 | if (ret->data != NULL) Free(ret->data); | 221 | if (ret->data != NULL) OPENSSL_free(ret->data); |
222 | s=(unsigned char *)Malloc((int)len + 1); | 222 | s=(unsigned char *)OPENSSL_malloc((int)len + 1); |
223 | if (s == NULL) | 223 | if (s == NULL) |
224 | { | 224 | { |
225 | i=ERR_R_MALLOC_FAILURE; | 225 | i=ERR_R_MALLOC_FAILURE; |
@@ -235,7 +235,7 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length, | |||
235 | else | 235 | else |
236 | { | 236 | { |
237 | s=NULL; | 237 | s=NULL; |
238 | if (ret->data != NULL) Free(ret->data); | 238 | if (ret->data != NULL) OPENSSL_free(ret->data); |
239 | } | 239 | } |
240 | 240 | ||
241 | ret->length=(int)len; | 241 | ret->length=(int)len; |
@@ -310,14 +310,14 @@ static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c) | |||
310 | if (!asn1_Finish(c)) goto err; | 310 | if (!asn1_Finish(c)) goto err; |
311 | 311 | ||
312 | a->length=num; | 312 | a->length=num; |
313 | if (a->data != NULL) Free(a->data); | 313 | if (a->data != NULL) OPENSSL_free(a->data); |
314 | a->data=(unsigned char *)b.data; | 314 | a->data=(unsigned char *)b.data; |
315 | if (os != NULL) ASN1_STRING_free(os); | 315 | if (os != NULL) ASN1_STRING_free(os); |
316 | return(1); | 316 | return(1); |
317 | err: | 317 | err: |
318 | ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE,c->error); | 318 | ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE,c->error); |
319 | if (os != NULL) ASN1_STRING_free(os); | 319 | if (os != NULL) ASN1_STRING_free(os); |
320 | if (b.data != NULL) Free(b.data); | 320 | if (b.data != NULL) OPENSSL_free(b.data); |
321 | return(0); | 321 | return(0); |
322 | } | 322 | } |
323 | 323 | ||