diff options
author | Richard Levitte <levitte@openssl.org> | 2004-03-08 04:37:04 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-03-08 04:37:04 +0000 |
commit | 29348d3c5c8371b8dc821b19925fb116269a3932 (patch) | |
tree | 7530394cb99c7cf72bb3064507ac3a8c5a7960d6 | |
parent | 649ce0516a36b7e87600ecbae62cda37b14c22f8 (diff) | |
download | openssl-new-29348d3c5c8371b8dc821b19925fb116269a3932.tar.gz |
Recent changes from 0.9.6-stable.
-rw-r--r-- | FAQ | 5 | ||||
-rw-r--r-- | crypto/pem/pem_lib.c | 7 |
2 files changed, 9 insertions, 3 deletions
@@ -111,11 +111,14 @@ OpenSSL. Information on the OpenSSL mailing lists is available from * Where can I get a compiled version of OpenSSL? +You can finder pointers to binary distributions in +http://www.openssl.org/related/binaries.html . + Some applications that use OpenSSL are distributed in binary form. When using such an application, you don't need to install OpenSSL yourself; the application will include the required parts (e.g. DLLs). -If you want to install OpenSSL on a Windows system and you don't have +If you want to build OpenSSL on a Windows system and you don't have a C compiler, read the "Mingw32" section of INSTALL.W32 for information on how to obtain and install the free GNU C compiler. diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index e024bd7873..1119c2f4d2 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -567,7 +567,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data, long len) { int nlen,n,i,j,outl; - unsigned char *buf; + unsigned char *buf = NULL; EVP_ENCODE_CTX ctx; int reason=ERR_R_BUF_LIB; @@ -587,7 +587,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data, goto err; } - buf=(unsigned char *)OPENSSL_malloc(PEM_BUFSIZE*8); + buf = OPENSSL_malloc(PEM_BUFSIZE*8); if (buf == NULL) { reason=ERR_R_MALLOC_FAILURE; @@ -608,12 +608,15 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data, EVP_EncodeFinal(&ctx,buf,&outl); if ((outl > 0) && (BIO_write(bp,(char *)buf,outl) != outl)) goto err; OPENSSL_free(buf); + buf = NULL; if ( (BIO_write(bp,"-----END ",9) != 9) || (BIO_write(bp,name,nlen) != nlen) || (BIO_write(bp,"-----\n",6) != 6)) goto err; return(i+outl); err: + if (buf) + OPENSSL_free(buf); PEMerr(PEM_F_PEM_WRITE_BIO,reason); return(0); } |