diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/asn1/a_object.c | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/asn1/a_object.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_object.c b/src/lib/libcrypto/asn1/a_object.c index b94b418ee8..09d56fb669 100644 --- a/src/lib/libcrypto/asn1/a_object.c +++ b/src/lib/libcrypto/asn1/a_object.c | |||
@@ -222,8 +222,8 @@ ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp, | |||
222 | } | 222 | } |
223 | if ((ret->data == NULL) || (ret->length < len)) | 223 | if ((ret->data == NULL) || (ret->length < len)) |
224 | { | 224 | { |
225 | if (ret->data != NULL) Free((char *)ret->data); | 225 | if (ret->data != NULL) Free(ret->data); |
226 | ret->data=(unsigned char *)Malloc((int)len); | 226 | ret->data=(unsigned char *)Malloc(len ? (int)len : 1); |
227 | ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; | 227 | ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; |
228 | if (ret->data == NULL) | 228 | if (ret->data == NULL) |
229 | { i=ERR_R_MALLOC_FAILURE; goto err; } | 229 | { i=ERR_R_MALLOC_FAILURE; goto err; } |
@@ -269,7 +269,7 @@ void ASN1_OBJECT_free(ASN1_OBJECT *a) | |||
269 | if (a == NULL) return; | 269 | if (a == NULL) return; |
270 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) | 270 | if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) |
271 | { | 271 | { |
272 | #ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause mempory leaks */ | 272 | #ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause memory leaks */ |
273 | if (a->sn != NULL) Free((void *)a->sn); | 273 | if (a->sn != NULL) Free((void *)a->sn); |
274 | if (a->ln != NULL) Free((void *)a->ln); | 274 | if (a->ln != NULL) Free((void *)a->ln); |
275 | #endif | 275 | #endif |