From 5cbe75a3facfe8256454595ca3abbff7ad6076b0 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Tue, 19 Aug 2014 14:20:23 -0400 Subject: Update openssl to 0.9.8zb Also update to Tiano Cryptlib r15802 and remove the execute mode bits from the C and header files of openssl --- Cryptlib/OpenSSL/crypto/asn1/asn_pack.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100755 => 100644 Cryptlib/OpenSSL/crypto/asn1/asn_pack.c (limited to 'Cryptlib/OpenSSL/crypto/asn1/asn_pack.c') diff --git a/Cryptlib/OpenSSL/crypto/asn1/asn_pack.c b/Cryptlib/OpenSSL/crypto/asn1/asn_pack.c old mode 100755 new mode 100644 index f1a5a056..c373714b --- a/Cryptlib/OpenSSL/crypto/asn1/asn_pack.c +++ b/Cryptlib/OpenSSL/crypto/asn1/asn_pack.c @@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_STRING **oct) if (!(octmp->length = i2d(obj, NULL))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); - return NULL; + goto err; } if (!(p = OPENSSL_malloc (octmp->length))) { ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } octmp->data = p; i2d (obj, &p); return octmp; + err: + if (!oct || !*oct) + { + ASN1_STRING_free(octmp); + if (oct) + *oct = NULL; + } + return NULL; } #endif -- cgit v1.2.3