diff options
author | nectar <nectar@FreeBSD.org> | 2002-07-30 13:38:06 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-07-30 13:38:06 +0000 |
commit | 2f13e0916590f8488178999aec4874ed5662a031 (patch) | |
tree | f3c141823975717e132c7687cf833f6378cc87d4 /crypto/openssl/crypto/asn1/a_set.c | |
parent | 0aed2eea83b351d68092e43b5a9496ce3dd5043d (diff) | |
download | FreeBSD-src-2f13e0916590f8488178999aec4874ed5662a031.zip FreeBSD-src-2f13e0916590f8488178999aec4874ed5662a031.tar.gz |
Import of OpenSSL 0.9.6e.
Diffstat (limited to 'crypto/openssl/crypto/asn1/a_set.c')
-rw-r--r-- | crypto/openssl/crypto/asn1/a_set.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/openssl/crypto/asn1/a_set.c b/crypto/openssl/crypto/asn1/a_set.c index caf5a14..5b0938e 100644 --- a/crypto/openssl/crypto/asn1/a_set.c +++ b/crypto/openssl/crypto/asn1/a_set.c @@ -116,7 +116,7 @@ int i2d_ASN1_SET(STACK *a, unsigned char **pp, int (*func)(), int ex_tag, } pStart = p; /* Catch the beg of Setblobs*/ - rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)); /* In this array + if (!(rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)))) return 0; /* In this array we will store the SET blobs */ for (i=0; i<sk_num(a); i++) @@ -133,7 +133,7 @@ SetBlob /* Now we have to sort the blobs. I am using a simple algo. *Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/ qsort( rgSetBlob, sk_num(a), sizeof(MYBLOB), SetBlobCmp); - pTempMem = OPENSSL_malloc(totSize); + if (!(pTempMem = OPENSSL_malloc(totSize))) return 0; /* Copy to temp mem */ p = pTempMem; |